|
On Oct 28, 2005, at 11:37 AM, Istvan Varga wrote:
> It is possible that PortMidi does not like to be initialized
> more than once on the Mac; to work around that, try not using any -M or
> -Q flags, assuming that you do not actually need real time MIDI for
> this
> CSD file.
Here's an example of using the cstclsh command to run Csound5 with
realtime MIDI. I run the following CSD file with the following
commandline and it plays great, with no errors. However, while running
the cstclsh shell, it would seem that when running the exact same
command for the second time in the same shell, Port MIDI fails to
initialize. I noticed also the DigiCoreAudioManger.app is still active
suggesting that the CoreAudio driver has not been terminated.
If the -M and -Q flags are omitted how does Csound know where to look
for realtime MIDI? Also are there more methods for cstclsh than just
csOpcodedir such as csIncdir, csSadir, or csSfdir at present ?
This shell idea is amazing, I've already set it as the default shell. I
feel that this is an amazing solution to realtime algorithmic
composition using TCL as a wrapper language to Csound. Honestly this
seems like the new functional equivalent for MacCsound on OSX as you
can just write a syntax coloring text editor in TCL!
Here's the CSD file I used (which is != the previously posted one,
apologies for confusion related to that) assuming no environment
variables set other than OPCODEDIR (as indicated by absolute paths
where necessary).
sr = 44100
kr = 441
ksmps = 100
nchnls = 2
strset 1, "/Users/daveakbari/Desktop/adrien_2.pvx"
/*--- ---*/
instr 1
ilen filelen 1
kscl ctrl7 1, 1, -12, 12
ksc = (2 ^ (kscl / 12))
kndx phasor (1 / p3)
kndx = kndx * ilen
fl pvsfread kndx, 1, 0
fr pvsfread kndx, 1, 0 ; 1 if stereo source
; printk2 ksc
fscl pvscale fl, ksc
fscr pvscale fr, ksc
al pvsynth fscl
ar pvsynth fscr
outs al, ar
endin
/*--- ---*/
f1 0 1024 43 "/Users/daveakbari/Desktop/adrien_2.pvx" 0
i1 0 [2.72]
s
i1 0 [2.72 * 2]
s
i1 0 [2.72 * 4]
s
i1 0 [2.72 * 8]
e
|--- FIRST RUN, as expected
cstclsh
(c) Victor Lazzarini
Music Technology Lab
NUI Maynooth, 2005
Localisation of messages is disabled, using default language.
time resolution is 1000.000 ns
% csCompile -odac:1 -idevaudio:1 -M0 -d -+rtaudio=CoreAudio
-+noninterleaved=1 /Users/daveakbari/gen43.csd
PortMIDI real time MIDI plugin for Csound
CoreAudio real-time audio module for Csound
by Victor Lazzarini
PortAudio real-time audio module for Csound
0dBFS level = 32768.0
Csound version 5.00.0 beta (double samples) Oct 27 2005
libsndfile-1.0.11
UnifiedCSD: /Users/daveakbari/Desktop/gen43.csd
STARTING FILE
Creating orchestra
Creating score
orchname: /var/tmp/tmp.orc
scorename: /var/tmp/tmp.sco
rtaudio: CoreAudio module enabled
rtmidi: PortMIDI module enabled
**** OSC: liblo started ****
orch compiler:
36 lines read
instr 1
Elapsed time at end of orchestra compile: real: 0.017s, CPU: 0.010s
sorting score ...
... done
Elapsed time at end of score sort: real: 0.021s, CPU: 0.010s
Csound version 5.00.0 beta (double samples) Oct 27 2005
midi channel 1 using instr 1
midi channel 2 using instr 1
midi channel 3 using instr 1
midi channel 4 using instr 1
midi channel 5 using instr 1
midi channel 6 using instr 1
midi channel 7 using instr 1
midi channel 8 using instr 1
midi channel 9 using instr 1
midi channel 10 using instr 1
midi channel 11 using instr 1
midi channel 12 using instr 1
midi channel 13 using instr 1
midi channel 14 using instr 1
midi channel 15 using instr 1
midi channel 16 using instr 1
displays suppressed
0dBFS level = 32768.0
Strsets[1]: '/Users/daveakbari/Desktop/adrien_2.pvx'
*** malloc[672]: error for object 0x511530: Double free
*** malloc[672]: error for object 0x511530: Double free
PortMIDI: selected input device 0: 'Oxygen 8: Port 1' (CoreMIDI)
orch now loaded
audio buffered in 1024 sample-frame blocks
==========================================================
CoreAudio Module: found 4 device(s):
=> CoreAudio device 0: Built-in Audio
=> CoreAudio device 1: Digidesign HW ( MBox )
=> CoreAudio device 2: Soundflower (2ch)
=> CoreAudio device 3: Soundflower (16ch)
selected device: 1
CoreAudio module: opening Digidesign HW ( MBox )
CoreAudio module: sr set to 44100 with 2 audio channels
CoreAudio module: device open with 4 buffers of 1024 frames
==========================================================
reading 4096-byte blks of shorts from devaudio:1 (RAW)
writing 4096-byte blks of shorts to dac:1
SECTION 1:
0
% csPlay
0
% ftable 1:
file /Users/daveakbari/Desktop/adrien_2.pvx (1986336 bytes) loaded into
memory
new alloc for instr 1:
B 0.000 .. 2.720 T 2.720 TT 2.720 M: 12023.4 12023.4
end of section 1 sect peak amps: 12023.4 12023.4
inactive allocs returned to freespace
SECTION 2:
...etc
csStop
inactive allocs returned to freespace
end of score. overall amps: 18521.9 18521.9
overall samples out of range: 0 0
0 errors in performance
Elapsed time at end of performance: real: 58.428s, CPU: 4.760s
coreaudio module: closing device...
coreaudio module: device closed
513 4096-byte soundblks of shorts written to dac:1
Removing temporary file /var/tmp/tmp.2.eqwYNS ...
Removing temporary file /var/tmp/tmp.sco ...
Removing temporary file /var/tmp/tmp.orc ...
|--- SECOND RUN, "Fails to initialize Port MIDI" ?
% csCompile -odac:1 -idevaudio:1 -M0 -d -+rtaudio=CoreAudio
-+noninterleaved=1 /Users/daveakbari/Desktop/gen43.csd
PortMIDI real time MIDI plugin for Csound
CoreAudio real-time audio module for Csound
by Victor Lazzarini
PortAudio real-time audio module for Csound
0dBFS level = 32768.0
Csound version 5.00.0 beta (double samples) Oct 27 2005
libsndfile-1.0.11
UnifiedCSD: /Users/daveakbari/Desktop/gen43.csd
STARTING FILE
Creating orchestra
Creating score
orchname: /var/tmp/tmp.orc
scorename: /var/tmp/tmp.sco
rtaudio: CoreAudio module enabled
rtmidi: PortMIDI module enabled
**** OSC: liblo started ****
orch compiler:
36 lines read
instr 1
Elapsed time at end of orchestra compile: real: 0.018s, CPU: 0.020s
sorting score ...
... done
Elapsed time at end of score sort: real: 0.020s, CPU: 0.020s
Csound version 5.00.0 beta (double samples) Oct 27 2005
midi channel 1 using instr 1
midi channel 2 using instr 1
midi channel 3 using instr 1
midi channel 4 using instr 1
midi channel 5 using instr 1
midi channel 6 using instr 1
midi channel 7 using instr 1
midi channel 8 using instr 1
midi channel 9 using instr 1
midi channel 10 using instr 1
midi channel 11 using instr 1
midi channel 12 using instr 1
midi channel 13 using instr 1
midi channel 14 using instr 1
midi channel 15 using instr 1
midi channel 16 using instr 1
displays suppressed
0dBFS level = 32768.0
Strsets[1]: '/Users/daveakbari/Desktop/adrien_2.pvx'
*** malloc[672]: error for object 0x520b70: Double free
*** malloc[672]: error for object 0x520b10: Double free
*** error initialising PortTime
*** error opening MIDI in device: -1 (Unknown MIDI error)
inactive allocs returned to freespace
end of score. overall amps: 0.0 0.0
overall samples out of range: 0 0
0 errors in performance
Elapsed time at end of performance: real: 0.031s, CPU: 0.030s
Removing temporary file /var/tmp/tmp.5.EOCHKM ...
Removing temporary file /var/tmp/tmp.sco ...
Removing temporary file /var/tmp/tmp.orc ...
-1
-David
-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc.
Get Certified Today * Register for a JBoss Training Course
Free Certification Exam for All Training Attendees Through End of 2005
Visit http://www.jboss.com/services/certification for more information
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net |