Dear Community,
I have a verry strange Problem.
I can Connect Sc with QTractor,
The Metare in the MIDI Track shows me that Messages comes from SC to the QTractor Programm - but when I start Recording QTractor crashes.
I have no Idea - why this
I use following Code:
// Boote Server to another Port
s = Server.local;
s.addr = NetAddr("127.0.0.1", 57121);
s.boot;
MIDIClient.init;
(
~pitches = [440, 440, 440];
~m = MIDIOut.new(0);
~r = Routine {
var bpm, pitch, midiN, conMidiN;
bpm = 80;
pitch = 66;
while(true)
{
pitch = ~pitches[0];
pitch.postln;
midiN = pitch.cpsmidi;
conMidiN = midiN.floor.asInteger;
conMidiN.postln;
//
~m.noteOn(1, conMidiN, 120);
(60/bpm).wait;
~m.noteOff(1, conMidiN);
}
};
)
~r.play;
``
Hi – with apologies, but would you mind to edit your post to put code within code tags, rather than quote tags?
If you write:
> "A quote".postln
“A quote”.postln
Note that the text is proportionally spaced, and that quote marks have changed to curly quotes, which SC won’t understand.
If you write:
```
"A quote".postln
```
"A quote".postln
The font is monospaced (indicating code) and the straight quote marks are safe to copy/paste into SC.
As for the crash, have you asked the qtractor community about it?
hjh
I hope this is just the right formate for the Code.
The Problem ist that I didn’t find the QTractor Forum in the Internet - have you probbality a Link to this Forum.
And the Problem ocurse only I try to Connect SC to this DAW. So I would excluse the probality that I have done anything wrong in the SC Code.
you can open an issue here GitHub - rncbc/qtractor: Qtractor - An Audio/MIDI multi-track sequencer or ask at linuxmusicians.com
Rui is very helpful.
The SC code looks fine.
I tried to create a MIDI track in qtractor and receive MIDI from SC , but didn’t reproduce the crash. So I don’t think anybody can really help you here unless you provide details about the track in qtractor that is getting MIDI from SC. and qtractor hangs when trying to enable recording on the track. Interesting. But, if I use Pd to confirm the MIDI bytes that SC is sending, they are standard:
print: 145 -- note on status byte
print: 69 -- note num
print: 120 -- velocity
print: 129 -- note off status byte
print: 69 -- note num
print: 64 -- release velocity
There’s just not so much that can go wrong with 3 bytes per message… it’s going to be necessary to investigate on the qtractor side as well.
hjh
OK, I was able to reproduce the hang using Pure Data. So the problem is not unique to SC.
The problem occurs when the note’s sustain time is the same as the IOI (inter-onset interval). In your SC code:
- Send note-on.
- Wait.
- Send note-off.
- Loop back and immediately send the next note-on.
When I replicate that behavior in Pd like this –
– where the IOI = 500 ms ([metro]) and the note duration also = 500 ms ([makenote]), when I enable recording in qtractor, I get exactly the same hang.
But if I change it to [makenote 64 300] so that the note duration is shorter, then I can record without difficulty.
If you change your SC code to send note-off and note-on at different times, I guess it will be OK.
Since the problem is reproducible with two different MIDI sources, it isn’t a SC problem – so, definitely file that bug report with qtractor.
hjh
He solved it already and posted the solution to linuxmusicians.com (only
).
I see. It’s worth it for people to consider that leaving solved questions floating around on a forum without closing them raises the possibility of other community members wasting time on those problems. Unnecessarily chewed up some of my SC time budget for this week, so I guess the next question that’s in my wheelhouse, I’ll have to sit it out ![]()
hjh
Your all have right,
It was a Bug in QTractor which is resolved in the actual Version.
I’m so silly !!!
Sorry
ComputerArtist_ThL
