Discussion:
MIDI output problem with simultaneous notes
albertoj
2014-10-06 18:52:01 UTC
Permalink
Hi list

I'm controlling an external drummachine with sc with the following code,
being 36 one part in the drummachine and 38 another one

------------------------
o = MIDIOut.newByName("USB2.0-MIDI", "Port 1");
x = Pdefn(\bd,Pseq([36,\rest,\rest,\rest], inf).trace)
y = Pdefn(\sd,Pseq([\rest,\rest,\rest,\rest,38,\rest,\rest,\rest],
inf).trace)

a = Pbind(\type, \midi, \midiout , o, \midinote , Pdefn(\bd));
b = Pbind( \type, \midi, \midiout , o, \midinote , Pdefn(\sd));

Ppar([a, b],inf).play;
------------------------

When I was running the code without the trace only 36 would play, then I
added the .trace and I saw that the other event wit the 38 was being
launched as well. After changing the array in pseq I found out that both
parts played so my conclusion is that the code is not being able to send 2
notes at the same time.

Has anyone found a way around this?








--
View this message in context: http://new-supercollider-mailing-lists-forums-use-these.2681727.n2.nabble.com/MIDI-output-problem-with-simultaneous-notes-tp7613793.html
Sent from the SuperCollider Users New (Use this!!!!) mailing list archive at Nabble.com.

_______________________________________________
sc-users mailing list

info (subscription, etc.): http://www.beast.bham.ac.uk/research/sc_mailing_lists.shtml
archive: http://www.listarc.bham.ac.uk/marchives/sc-users/
search: http://www.listarc.bham.ac.uk/lists/sc-users/search/
Daniel Mayer
2014-10-06 19:20:53 UTC
Permalink
Post by albertoj
When I was running the code without the trace only 36 would play, then I
added the .trace and I saw that the other event wit the 38 was being
launched as well. After changing the array in pseq I found out that both
parts played so my conclusion is that the code is not being able to send 2
notes at the same time.
No, from the midi side that should be fine.
You can check with a midi monitoring software
(e.g. on OSX: http://www.snoize.com/MIDIMonitor)
or with a MIDI instrument on your computer:


MIDIClient.init;

m = MIDIOut(0);


x = Pdefn(\bd, Pseq([60, \rest, \rest, \rest], inf).trace)
y = Pdefn(\sd, Pseq([\rest, \rest, \rest, \rest, 62, \rest, \rest, \rest], inf).trace)


a = Pbind(\type, \midi, \midiout, m, \midinote, Pdefn(\bd), \dur, 0.2);
b = Pbind(\type, \midi, \midiout, m, \midinote, Pdefn(\sd), \dur, 0.2);


z = Ppar([a, b],inf).play;
z.stop;

Maybe you have a monophonic setting on your drummachine
and would need to use two MIDI channels.

Greetings

Daniel

-----------------------------
www.daniel-mayer.at
-----------------------------



_______________________________________________
sc-users mailing list

info (subscription, etc.): http://www.beast.bham.ac.uk/research/sc_mailing_lists.shtml
archive: http://www.listarc.bham.ac.uk/marchives/sc-users/
search: http://www.listarc.bham.ac.uk/lists/sc-users/search/
albertoj
2014-10-06 21:21:19 UTC
Permalink
Hi Daniel

Thanks for your quick reply. I ran a quick test on reaper, and it turns out
I get the same behaviour, so it seems my usb to midi interface doesn't send
simultaneous midi notes.

Thanks anyway



--
View this message in context: http://new-supercollider-mailing-lists-forums-use-these.2681727.n2.nabble.com/MIDI-output-problem-with-simultaneous-notes-tp7613793p7613799.html
Sent from the SuperCollider Users New (Use this!!!!) mailing list archive at Nabble.com.

_______________________________________________
sc-users mailing list

info (subscription, etc.): http://www.beast.bham.ac.uk/research/sc_mailing_lists.shtml
archive: http://www.listarc.bham.ac.uk/marchives/sc-users/
search: http://www.listarc.bham.ac.uk/lists/sc-users/search/
James Harkins
2014-10-07 01:10:24 UTC
Permalink
Post by albertoj
Thanks for your quick reply. I ran a quick test on reaper, and it turns out
I get the same behaviour, so it seems my usb to midi interface doesn't send
simultaneous midi notes.
If there are three elements (sending software, MIDI interface and receiving
device), and two different programs get the same faulty result, then you've
ruled out the sender as the culprit. That still doesn't say whether the
interface or the receiving device is the problem -- not enough information
to say that it's definitely the interface.

As a workaround, in SC, you could add a very small random lag to the
Pbinds, so that the notes are sent at slightly different times, but still
within the human threshold for differentiating sonic events... say, \lag,
Pwhite(0.001, 0.004, inf).

hjh

Sent with AquaMail for Android
http://www.aqua-mail.com



_______________________________________________
sc-users mailing list

info (subscription, etc.): http://www.beast.bham.ac.uk/research/sc_mailing_lists.shtml
archive: http://www.listarc.bham.ac.uk/marchives/sc-users/
search: http://www.listarc.bham.ac.uk/lists/sc-users/search/
albertoj
2014-10-07 13:03:46 UTC
Permalink
Hey ddw_music, thanks for the tip.Will try that, although I've already
ordered another midi interface.The one I had costed £3 so I guess I had it
coming



--
View this message in context: http://new-supercollider-mailing-lists-forums-use-these.2681727.n2.nabble.com/MIDI-output-problem-with-simultaneous-notes-tp7613793p7613813.html
Sent from the SuperCollider Users New (Use this!!!!) mailing list archive at Nabble.com.

_______________________________________________
sc-users mailing list

info (subscription, etc.): http://www.beast.bham.ac.uk/research/sc_mailing_lists.shtml
archive: http://www.listarc.bham.ac.uk/marchives/sc-users/
search: http://www.listarc.bham.ac.uk/lists/sc-users/search/

Loading...