Midi sequences no longer trigger on-beat
i have had recent problems where my project midi sequences suddenly do not trigger my external synths on-beat anymore - on playback i hear the messages triggered well before the beat. the bizzare thing is that if I record the audio input from that sequence, the recorded audio file is on-beat! if i open a new project everything is fine - so i don't think this is a latency issue. this has happened to a few projects recently. any suggestions on the fix, or what is causing the problem?
Hi,
I believe your problem is to with the incorrect PDC implementation Logic has for external midi.
Unfortunately, you have one of two choices,
1) do your midi outside logic (which I have sometimes resorted to)
or
2) use an external instrument object for your midi in logic, and route the audio output of your external into logic. This way you will get perfect and tight midi on playback, you just better not try record any jazz solos because the latency off course now affects your external midi instrument.
From http://support.apple.com/kb/HT1213:
+"Another effect with delay compensation set to All is that MIDI tracks triggering external sound modules will be out of sync. This is because Logic has no direct control over the audio output of external devices. A possible solution for this would be to route the audio outputs from the external MIDI devices to inputs on your audio hardware and monitor them through Logic. This way, the audio streams from the MIDI devices can be compensated during playback. Using Logic's External instrument to route MIDI to your external devices is an ideal way to work in this situation."+
The above statement is my one and only gripe with logic. All they have to do is not send midi messages for the same amount of time that they set aside for PDC and everything would be great.
I've heard of others using complicated methods to get around this, but they involve finding out the delay, which changes with every plug in introduced and subtracted, and whether your Mac is having a good or bad hair day.
good luck.
Similar Messages
-
Detect Note Changes in MIDI Sequencer
Hi all,
I’m trying to detect when the MIDI Sequencer changes notes using some kind of a listener to detect when the note changes occur. My example program is able to detect the end of the sequence and I’d like to be able to detect note changes and print a message in a similar way. Here is my example code.
import javax.swing.*;
import javax.sound.midi.*;
public class SequencerTestApplet extends JApplet
public void init()
SequencerTest seqTest = new SequencerTest();
seqTest.play();
System.out.println("Print from init()");
class SequencerTest
Sequencer sequencer=null;
Sequence seq=null;
Track track=null;
public SequencerTest()
try
{ sequencer = MidiSystem.getSequencer();
sequencer.open();
// detect END OF SEQUENCE
sequencer.addMetaEventListener(
new MetaEventListener()
{ public void meta(MetaMessage m)
{ if (m.getType() == 47) System.out.println("SEQUENCE FINISHED");
sequencer.setTempoInBPM(40);
seq = new Sequence(Sequence.PPQ, 16);
track = seq.createTrack();
catch (Exception e) { }
public void play()
try
{ // NOTE 1
ShortMessage noteOnMsg = new ShortMessage();
noteOnMsg.setMessage(ShortMessage.NOTE_ON, 0, 60, 93);
track.add(new MidiEvent(noteOnMsg, 0));
ShortMessage noteOffMsg = new ShortMessage();
noteOffMsg.setMessage(ShortMessage.NOTE_OFF, 0, 60, 93);
track.add(new MidiEvent(noteOffMsg, 16));
// NOTE 2
ShortMessage noteOnMsg2 = new ShortMessage();
noteOnMsg2.setMessage(ShortMessage.NOTE_ON, 0, 68, 93);
track.add(new MidiEvent(noteOnMsg2, 16));
ShortMessage noteOffMsg2 = new ShortMessage();
noteOffMsg2.setMessage(ShortMessage.NOTE_OFF, 0, 68, 93);
track.add(new MidiEvent(noteOffMsg2, 32));
sequencer.setSequence(seq);
sequencer.start();
catch (Exception e) { }
}In this program the init() method starts the sequencer through the play() method and then continues on so that the “print from init()” statement is printed from the init() method while the sequencer is still playing. Then after the sequencer is finished, it uses the MetaEventListener to detect the end of the sequence and print the “sequence finished” message. I’d like to be able to make it also detect when the sequence changes notes in a similar way... Start the sequence and move on, but then be able to detect each time a note change occurs and print a message.
Since I am putting the notes at specific midi ticks (multiples of 16, or “quarter notes”) I could poll the Sequencer using getTickPosition() to see if the Sequencer’s tick position matches a particular multiple of 16. However, the problem with this is it would lock up the program since it would be constantly polling the sequencer and the program wouldn’t be able to do anything else while the Sequencer is playing (and I also have a loop option for the Sequencer so that would lock up the program indefinitely).
Here’s what I’ve found out and tried so far...
I read in this [this tutorial|http://java.sun.com/docs/books/tutorial/sound/MIDI-seq-adv.html] on the java sun site (under “Specifying Special Event Listeners”) that The Java Sound API specifies listener interfaces for control change events (for pitch-bend wheel, data slider, etc.) and meta events (for tempo change commands, end-of-track, etc.) but it says nothing about detecting note changes (note on/off). Also in the [EventListener API|http://java.sun.com/j2se/1.3/docs/api/java/util/class-use/EventListener.html] (under javax.sound.midi) it only lists the ControllerEventListener and the MetaEvenListener.
I also read here that MIDI event listeners listen for the end of the MIDI stream, so again no info about detecting note changes.
It seems like the sequencer should have some way of sending out messages (in some fashion) when these note changes happen, but I’m not sure how or even if it actually does. I’ve looked and looked and everything seems to be coming back to just these two types of listeners for MIDI so maybe it doesn’t.
To be sure the MetaEventListener doesn’t detect note changes I changed the MetaMessage from:
public void meta(MetaMessage m)
{ if (m.getType() == 47) System.out.println("SEQUENCER FINISHED");
}to:
public void meta(MetaMessage m)
{ System.out.println("" + m.getType());
}so that it would print out all of the MetaMessages it receives. The only message that printed was “47” which indicates the end of the sequence. So the MetaEventListener doesn’t appear to do what I need it to do.
I realize this is a rather odd problem and probably not many people have had the need to do something like this, but it never hurts to ask. If anyone has any suggestions on how to solve this problem it would be greatly appreciated.
Thanks,
-tkrTekker wrote:
As another idea, since I can't do it with a listener like I originally wanted to, would adding a separate thread to poll the sequencer and send an interrupt when it matches a particular midi tick be a good route to try? My thinking is this essentially act kind of like a listener by running in the background and reporting back when it changes notes.Yep, that worked! :)
import javax.swing.*;
import javax.sound.midi.*;
public class ThreadTestApplet extends JApplet
public void init()
ThreadTest threadTest = new ThreadTest();
threadTest.play();
MIDIThread thread = new MIDIThread(threadTest.sequencer);
thread.start();
System.out.println(" Print from init() 1");
try { Thread.sleep(1000); } catch (InterruptedException ie) {}
System.out.println(" Print from init() 2");
try { Thread.sleep(1000); } catch (InterruptedException ie) {}
System.out.println(" Print from init() 3");
try { Thread.sleep(1000); } catch (InterruptedException ie) {}
System.out.println(" Print from init() 4");
class ThreadTest
Sequencer sequencer=null;
Sequence seq=null;
Track track=null;
public ThreadTest()
System.out.println("Sequencer Started");
try
{ sequencer = MidiSystem.getSequencer();
sequencer.open();
// detect END OF SEQUENCE
sequencer.addMetaEventListener(
new MetaEventListener()
{ public void meta(MetaMessage m)
{ if (m.getType() == 47) System.out.println("SEQUENCER FINISHED");
sequencer.setTempoInBPM(40);
seq = new Sequence(Sequence.PPQ, 16);
track = seq.createTrack();
catch (Exception e) { }
public void play()
try
{ // NOTE 1
ShortMessage noteOnMsg = new ShortMessage();
noteOnMsg.setMessage(ShortMessage.NOTE_ON, 0, 60, 93);
track.add(new MidiEvent(noteOnMsg, 0));
ShortMessage noteOffMsg = new ShortMessage();
noteOffMsg.setMessage(ShortMessage.NOTE_OFF, 0, 60, 93);
track.add(new MidiEvent(noteOffMsg, 16));
// NOTE 2
ShortMessage noteOnMsg2 = new ShortMessage();
noteOnMsg2.setMessage(ShortMessage.NOTE_ON, 0, 68, 93);
track.add(new MidiEvent(noteOnMsg2, 16));
ShortMessage noteOffMsg2 = new ShortMessage();
noteOffMsg2.setMessage(ShortMessage.NOTE_OFF, 0, 68, 93);
track.add(new MidiEvent(noteOffMsg2, 32));
sequencer.setSequence(seq);
sequencer.start();
catch (Exception e) { }
import javax.sound.midi.*;
public class MIDIThread extends Thread
Sequencer sequencer=null;
long midiTick=0;
long midi_progressionLastChord=32;
boolean print = true;
public MIDIThread(Sequencer sequencer)
this.sequencer = sequencer;
public void run()
System.out.println("Thread Started");
while (midiTick<midi_progressionLastChord)
{ midiTick = sequencer.getTickPosition();
if (midiTick == 0 || midiTick == 16)
{ if (print)
{ System.out.println("NOTE CHANGE");
print = false;
else
print = true;
}I put in several print statements (with pauses in the init method) and the init print statements continue to be printed while the sequencer is playing, so it's not locking up the system and the "note change" statements happen when the sequencer changes notes. So this part is working perfectly! :)
Here's what I got for my output:
Sequencer Started
Print from init() 1
Thread Started
NOTE CHANGE
Print from init() 2
NOTE CHANGE
Print from init() 3
SEQUENCER FINISHED
Print from init() 4
The only problem I'm having is how to "throw" this action back up to the main init method and have it do the print statement instead of the thread class. Throwing an interrupt apparently won't work as you have to poll it to see if it has been interrupted (so it'd be no different than just polling the sequencer to see if it equals the specific midi tick). Maybe throw an ActionEvent? But how to attach it to my applet? Would I need to create an instance of my applet and then pass that into the thread class so it can catch the ActionEvent? And if I do that will it stop the thread or will it keep the thread running so can detect the other notes?... Or is there a better/simpler way to do this?
Thanks again,
-tkr -
How can I play along with a MIDI sequence in Mainstage?
Hi folks,
I have some live performances where I would like to play along with MIDI sequences. I've been using Mainstage and software instruments, but can't for the life of me figure out how do play along with MIDI sequences. There's a nice plugin (whose name escapes me at the moment) that lets you play along with looped audio tracks....but a MIDI file would be better for my purposes. Is there a way to do this?
Thanks in advance,
-Mike KaplanHi
Not directly within Mainstage.... there could be workarounds using 3rd party applications slaved to MS, but it would be a complete pita (compared to working with scripts to iTunes Playlists or just bouncing the MIDI files to audio).
CCT -
Using sequence in insert trigger?
Hi all,
I'm new to this forum, and for that matter, any forums related to computers.
I would appreciate it if anyone would give me some hinters.
I created a table with an ID column of type "Number." And I want to populate that column with a sequence number everytime I insert into that table.
I have a sequence named "sequence1_account."
Below is my insert trigger code:
create TRIGGER system.trigger1_account
BEFORE INSERT ON system.table_account
for each row
BEGIN
:new.id := sequence1_account.NextVal;
END;
Note:
user is "system"
table is "table_account"
The error that I get when I try to compile this is
PLS-00357: Table,View Or Sequence reference 'SEQUENCE1_ACCOUNT.NEXTVAL' not allowed in this context
So, does that mean I cannot use a sequence in a trigger?
Thanks in advance!
in His love,
HSHello,
Hoping for some help with sequence triggers as well.
CREATE TRIGGER "SCALS"."TRIGGER_CALL_NUM"
BEFORE INSERT ON "CALLLOG" FOR EACH ROW
BEGIN
select num_callers.NextVal into : new.callernumber from dual;
END;
Problem is that the trigger status is invalid ??
The error I get is in German (German installation)
Zeilen-# = 0 Spalten-# = 0 Fehlertext = PLS-00801: internal error [ph2csql_strdef_to_diana:bind]
Zeilen-# = 2 Spalten-# = 57 Fehlertext = PL/SQL: ORA-06544: PL/SQL: internal error, arguments: [ph2csql_strdef_to_diana:bind], [], [], [], [], [], [], []
Zeilen-# = 2 Spalten-# = 1 Fehlertext = PL/SQL: SQL Statement ignored
But perhaps something looks familiar??? -
3.50mm to 6.35mm plug adapter, music in Midi Sequence for
Hey all,
I just bought the X-FI Platinum card to go with my Logitech Z-5500s. The problem is the platinum card only comes with ONE 3.50mm to 6.35mm plug adapter, and two are needed to connect to a headset's sound jack and microphone jack, on the X-FI I/O Dri've. Where can I shop online to buy another 3.50mm to 6.35mm plug adapter? Please link if possible.
Also, I've noticed that ever since I bought the sound card, the music that I have on the computer that are Midi Sequence Files won't play any sound. It would play on my old onboard nforce2 soundstorm. What is wrong? I have two files that are in this format so I'd like to hear them.
One last thing. Since I have the Logitech Z5500s and X-Fi platinum, what kind of wire should I need to buy to connect to my TV? and PS2? Thx) http://cgi.ebay.com/ws/eBayISAPI.dll...ype=osi_widget is the type of adapter that you're looking for.
2) Click on Start->Settings->Control Panel->Sound and Audio devices->Audio Tab and from here set the MIDI music playback device to be your soundcard's synth A or synth B.
3) It depends on what outputs your TV's got. If it's got a headphone socket you could use 3.5 mm double ended cable to go to your Z5500s aux input from your TV's headphone socket. A better way to do it is to use a phono x 2 to stereo mini-plug cable
http://www.sonystyle.com/is-bin/wbrI...es_AudioCables
if your TV's got phono x 2 outputs at the back. You can plug this into your Z-5500s aux inputs.
You should really be asking this on the Logitech forums. -
Vibe: A Midi sequencer for MIDP 2.0. beta released
Hi
We've just released a beta test version of Vibe: a multitrack pattern Midi sequencer for mobiles. Its free to download at http://vibejive.net for anyone who wishes to try it out.
Vibe has powerful graphical editing of track and note data. Songs can be saved to the phone or uploaded to a central online song repository for downloading by other Vibe users. You can also import/export Vibe songs as standard Midi, and Vibe can also place songs onto the phone as Ringtones.
Visit http://vibejive.net for more information and free download.
Thanks
VibeJiveHi
We've just released a beta test version of Vibe: a multitrack pattern Midi sequencer for mobiles. Its free to download at http://vibejive.net for anyone who wishes to try it out.
Vibe has powerful graphical editing of track and note data. Songs can be saved to the phone or uploaded to a central online song repository for downloading by other Vibe users. You can also import/export Vibe songs as standard Midi, and Vibe can also place songs onto the phone as Ringtones.
Visit http://vibejive.net for more information and free download.
Thanks
VibeJive -
My wish: to create a blank midi sequence, add a track,
and populate the track with midi events.
I get as far as creating the new track, and am unable to create a MidiEvent on the track.
Any help would be much appreciated.
--John HeldSpoke to soon.
Code compiles,but when run, sequencer.setSequence(seq) chokes (seq being a valid,non-null sequence).
The API says I can use either a file or a sequence, but sure seems to only want a file.
Any thoughts?
--John -
Using garageband as a midi sequencer for a synthesizer
Sorry for the newbie question.
I have an old korg trinity synth that has some wonderful instruments on it. I want to use garageband just as a midi sequencer. No audio recording going on here, and no usage of the garageband sounds (or just minor use).
I ordered a midi-usb interface.
I want to multi-track so I want garageband to record midi on one track while it is playing out midi on another.
Is this all easy stuff for garageband, or will I hit any snags (like latency?)
Thankshttp://www.bulletsandbones.com/GB/GBFAQ.html#midiout
(Let the page FULLY load. The link to your answer is at the top of your screen) -
Send MIDI Sequence to GarageBand
Hello,
Is it possible to write a Java program that OSX will see as a virtual MIDI device (just like it might see a real MIDI USB keyboard) so that I can programmatically generate and send MIDI sequences through GarageBand?
I am experienced with Java and C and I have written device drivers. But I am not sure where to begin because I have zero experience with the javax.sound.midi package.
I envision the following: When I run the program from a terminal it initializes a virtual device and then pauses. At this point if GarageBand is running I should see the familiar "The number of midi inputs has changed" message. Then each time I hit <Enter> and it plays my coded MIDI sequence. I can select a different instrument in GarageBand and hit <Enter> again and it will play the sequence again using the new instrument. Pressing 'x' or a special character will cause the device to deinitialize again triggering the aforementioned GarageBand message and the Java program will exit.
Is this possible?
Any direction would be greatly appreciated.
MikeHi,
I have a similar question, so I'm curious if you ever found an answer to yours. I was wondering if I could get a Java sound Synthesizer for a native synthesizer AudioUnit (specifically Ivory Pianos). It doesn't look like it.
Rob -
media control devices .. (mci) midi Sequencer .. properties .. (No Devices) ..!
Xp Home .. SP3 .. Re-Installed latest Realtek audio pack (sp26552.exe)
No Hardware conflicts, Devices enabled, No Volume control, No Sytem sounds, etc ..!
Sound manager, Speaker Test works Fine ..! O.o
Any Assist would be Greatly appreciated..!
This question was solved.
View Solution.No Idea what happened.. Blue Screened Out ..
restart.. and all is working as should be O.o .. Gremlins..! -
Problem using a sequence in a trigger
I am creating a table, sequence and trigger as below. When I insert into the table I get the error message
'ORA-04098: trigger 'SIMS2.BEF_INS_MATERIAL_COST' is invalid and failed re-validation'
I am using TOAD rather than SQL Plus to do all this. Any idea what is causing the problem?
create table material_costs
material_id NUMBER(8) not null,
material_desc VARCHAR2(50),
material_rate NUMBER(8,2)
tablespace sims2data;
create index material_costs_1
ON material_costs (material_id)
tablespace sims2index;
create sequence material_costs_seq
increment by 1
start with 1
nomaxvalue
nocycle
noorder
cache 100;
create or replace trigger bef_ins_material_cost
before insert
on material_costs
for each row
begin
if inserting then
select material_costs_seq.nextval into new.material_id
from dual;
end if;
end;Some older versions of Oracle do not allow the direct assignment of a sequence to the column, so you could try
CREATE OR REPLACE TRIGGER bef_ins_material_cost
BEFORE INSERT ON material_costs
FOR EACH ROW
DECLARE
l_seqval NUMBER;
BEGIN
SELECT material_costs_seq.nextval INTO l_seqval
FROM dual;
:NEW.material_id := l_seqval;
END; The TOAD editor does not require the :new syntax because new.material_id is, at least potentially, a valid construct, and can only be resolved at compile time by Oracle. Oracle will certainly complain about new.material_id not being declared.
HTH
John -
Using a sequence inside BEFORE TRIGGER
Hi all,
I just created a testtable and a sequence to use as a primary key column value for that table.
I tried to create a BEFORE INSERT trigger on that table and in the trigger i tried to set up the primary key column value using the sequence
but while compiling i am getting the error "Error(9,30): PLS-00357: Table,View Or Sequence reference 'SEQ_OF_TESTTABLE.NEXTVAL' not allowed in this context"
My Version:Oracle Database 10g Express Edition Release 10.2.0.1.0 - Product
All the objects created with the same user. I would appraciate any help, thanks all
EDIT
I solved the problem using the below
create or replace
TRIGGER Bef_Ins_On_Testtable
BEFORE INSERT ON TestTable
FOR EACH ROW
declare
ntemp_id INT;
BEGIN
SELECT SEQ_OF_TESTTABLE.NEXTVAL INTO ntemp_id FROM DUAL ;
DBMS_OUTPUT.PUT_LINE('İNSERTED');
:NEW.VSURNAME := 'HAKKİ' ;
:NEW.NID := ntemp_id;
END;But i wonder why i can use the sequence(just as seqeunce_name.NEXTVAL) in INSERT statement and why cant in trigger?
Edited by: user9371286 on 31.Tem.2010 04:15
Edited by: user9371286 on 31.Tem.2010 04:21
Edited by: user9371286 on 31.Tem.2010 04:27Please post your trigger code and your database version ( the result of: select * from v$version; ).
Put it between tags, so your example will stay formatted.
(see: http://forums.oracle.com/forums/help.jspa for more examples regarding tags)
"PLS-00357: Table,View Or Sequence reference "string" not allowed in this context
Cause: A reference to database table, view, or sequence was found in an inappropriate context. Such references can appear only in SQL statements or (excluding sequences) in %TYPE and %ROWTYPE declarations. Some valid examples follow: SELECT ename, emp.deptno, dname INTO my_ename, my_deptno, my_dept .FROM emp, dept WHERE emp.deptno = dept.deptno; DECLARE last_name emp.ename%TYPE; dept_rec dept%ROWTYPE;
Action: Remove or relocate the illegal reference."
+http://download.oracle.com/docs/cd/B19306_01/server.102/b14219/plsus.htm#sthref13592+
You can find examples of triggers referring to sequences here, by doing a search on this forum or:
http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14251/adfns_triggers.htm#ABC1032282 -
My iphone5 after update is no longer compatiable to beats by dre system how can i fix this
My iphone5 after the 8.0 update is no longer compatiable with an audio device "Beats by DRE" how can this be fixed< or how do i downgrade
Downgrading is not supported at all.
What troubleshooting steps have you taken so far? Have you deleted the pairing on both devices? I'm having no issue with my Beats devices (Pill, BT headphones) with my iDevices running iOS 8. -
SCCM Task Sequence no longer installs SCCM Client
I am using SCCM 2007 R3 with SP2 and MDT 2010
My task sequences were all working fine until one of the other SCCM admins "Synced all sites" by transferring the site settings of one site to all the other sites. How this broke OSD I don't know.
At this point the best I can tell is that the SCCM client is not being installed in the Task Sequence and so when it reboots to the installed OS there is no longer any communication and the task sequence fails with an error of "Windows could not configure
one or more system components. To install Windows, restart the computer and then restart the installation.
I have run out of ideas to fix it so I am asking for the collective knowledge of the Interwebs for help.Please post the contents of C:\Windows\ccmsetup\logs\ccmsetup.log in order for us to help you further
Blog: www.danielclasson.com/blog |
LinkedIn:
Daniel Classon | Twitter: @danielclasson -
ORA-04016 - Sequence no longer exists
Hi,
In the below scenario
1. All the sequences are dropped
2. When a process requires a value from a sequence and the sequence is not available, it is created and then a sequence.nextval is executed.
This statement is returning a ORA-04016 - Sequence <XXX> no longer exists.
Based on the following Metalink 1300837.1, we tried putting a sleep(5) between the sequence creation and fetch. The problem still occurs intermittently.
DB Version is 11.2.0.2 on Exadata with 6 nodes.
Even after an extensive search on the web, I could not find anything.
Is there any workaround for this or is there some DB patch to be applied?
ThanksHave you tried sleeping for longer?
Alternative approaches that spring to mind are:
1) Ensure that the statements that create the sequence and those that subsequently use it are executed on the same node when executed in close succession.
2) Trap the error and retry in your code.
I'd be inclined to favour suggestion 1 if possible in your environment.
Is your code in PL/SQL?
Maybe you are looking for
-
I recently purchased an iPhone 5c and for some unknown reason I can't connect to my wireless router's network at home. I've tried establishing a seperate IP address, manually adding the iPhone device, and even spent an hour with Centurylink's IT supp
-
How do I resolve devices using same ip address?
I keep getting the message another device on the network is using your computer IP address. I'm trying to connect my airport time capule and I'm using a MacBook Pro. I've shut down and restarted and checked everything already discussed in posts.
-
I have recently noticed that the track order in some of my albums has gone all screwy. Even though when I go to >Get Info, and verify that the track order and disk number is correct, they don't appear in the order listed. For Example, when I sort by
-
WiFi Adapter not detected on T530
Hi there, I just purchased a refurb T530 form the Lenovo outlet and have had enormous problems with the Wifi Adapter. Machine: T530 Win 64 Pro Wifi card Realtek I know there have been many similar discussions of this issue in the past, so I can start
-
What are the most demanded skills in sharepoint 2013 that is most in demand
I have been working on sharepoint 2010 from past 3.5 years. Now I have stared to work on sharepoint 2013. SharePoint 2013 is also as vast as SharePoint 2010 is. I want to know which all features or modules of sharepoint 2013 are most in demand acro