[Csnd] csd-file doesn't produce a wav-file
Date | 2010-11-25 15:18 |
From | Stefan Thomas |
Subject | [Csnd] csd-file doesn't produce a wav-file |
Attachments | ausschnitt.mid |
Dear community, the following csd-file doesn't produce the desired test.wav I don't see what could be my mistake. Here is the file, the midi is attached. <CsoundSynthesizer> <CsOptions> ;-odevaudio -Ma -b400 -m0d </CsOptions> --midifile=ausschnitt.wav --output=test.wav -Ma -b400 -m0d xeno04c.csd <CsInstruments> sr = 44100 ksmps = 100 nchnls = 2 0dbfs = 1 giPartamps ftgen 0, 0, -30, -2, 0.500804, 0.173136, 0.160991, 0.101076, 0.081932, 0.067141, 0.045805, 0.036794, 0.035306, 0.029838, 0.011930, 0.011010, 0.010675, 0.008733, 0.008409, 0.008226, 0.007619, 0.005701, 0.005513, 0.005106, 0.004824, 0.004630, 0.004250, 0.004002, 0.003883, 0.003451, 0.003443 giPartfreqs ftgen 0, 0, -30, -2, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30 giTuning ftgen 0, 0, 64, -2, 6, 1.625, 261.63, 60, 1.00, 1.08428194851, 1.17566734386, 1.2747548784, 1.38219370342, 1.49868768196, 1.625 ; tuning-table giLauter ftgen 0, 0, -30, -2, 0 ;ungelöst! giSine ftgen 0, 0, 2^10, 10, 1 massign 0, 10 instr 1 gimaxdur = 16 ;maximaldauer bei einem sehr lauten ton endin instr 10 ;wird durch midi ausgelöst und ruft inumparts instanzen von instr 100 fuer die teiltoene inumparts = 24 ;wieviele teiltöne wollen wir imidinot notnum icps cpstmid giTuning ;grundfrequenz dieser taste iamp ampmidi 0.3 idur = gimaxdur * iamp indx = 1 ;wir starten beim ersten teilton isubinstr = 100+imidinot/1000 ;zb 100.060 für c loop: ipartamp tab_i indx-1, giPartamps ipartamp = ipartamp * iamp ipartfreq tab_i indx-1, giPartfreqs ipartfreq = ipartfreq * icps event_i "i", isubinstr, 0, idur, ipartfreq, ipartamp, indx, iamp loop_le indx, 1, inumparts, loop krelease release if krelease == 1 then ;beim note off event turnoff2 isubinstr, 4, 1 endif endin instr 100 ;spielt einen teilton: hohe teiltöne sind kürzer idur = p3 ;dauer ifreq = p4 ;teiltonfrequenz iamp = p5 ;teiltonamplitude ittnr = p6 ;welcher teilton ist dran ivel = p7 ;anschlagslautstärke (0-1) iveldiv = 6 ;mögliche abweichung eines teiltons in db iveldivfq = 1 ;frequenz für neue zufallswerte dafür kveldiv randi iveldiv, iveldivfq ;bewegung in dB kampdiv = ampdb(kveldiv) ;bewegung als lautstärkenfaktor kvel = ivel * kampdiv ;bewegung bezogen auf ursprüngliche lautstärke ;idurtt = (idur / ittnr) * 2 ;das muss man verbessern asig poscil iamp, ifreq, giSine aenv expsegr 0.01, 0.01, 1, idur-0.1, .001, .2,.00001 aout = asig * aenv outs aout, aout endin </CsInstruments> <CsScore> f 0 36 i 1 0 36 i 10 0 36 i100 0 36 </CsScore> </CsoundSynthesizer> |
Date | 2010-11-25 15:22 |
From | Justin Glenn Smith |
Subject | [Csnd] Re: csd-file doesn't produce a wav-file |
Stefan Thomas wrote: > Dear community, > the following csd-file doesn't produce the desired test.wav > I don't see what could be my mistake. > Here is the file, the midi is attached. > > |
Date | 2010-11-25 15:26 |
From | Stefan Thomas |
Subject | [Csnd] Fwd: Re: csd-file doesn't produce a wav-file |
Dear Justin, You are right. I've changed the options to: <CsOptions> --midifile=ausschnitt.mid --output=test.wav -Ma -b400 -m0d xeno04c.csd </CsOptions> It produces the file test.wav but the file is silent! ---------- Weitergeleitete Nachricht ---------- Von: Justin Glenn Smith <noisesmith@gmail.com> Datum: 25. November 2010 16:22 Betreff: [Csnd] Re: csd-file doesn't produce a wav-file An: csound@lists.bath.ac.uk Stefan Thomas wrote: > Dear community, > the following csd-file doesn't produce the desired test.wav > I don't see what could be my mistake. > Here is the file, the midi is attached. > > <CsoundSynthesizer> > <CsOptions> > ;-odevaudio -Ma -b400 -m0d > </CsOptions> > --midifile=ausschnitt.wav --output=test.wav -Ma -b400 -m0d xeno04c.csd > <CsInstruments> > sr = 44100 > ksmps = 100 > nchnls = 2 > 0dbfs = 1 > > giPartamps ftgen 0, 0, -30, -2, 0.500804, 0.173136, 0.160991, > 0.101076, 0.081932, 0.067141, 0.045805, 0.036794, 0.035306, 0.029838, > 0.011930, 0.011010, 0.010675, 0.008733, 0.008409, 0.008226, 0.007619, > 0.005701, 0.005513, 0.005106, 0.004824, 0.004630, 0.004250, 0.004002, > 0.003883, 0.003451, 0.003443 > giPartfreqs ftgen 0, 0, -30, -2, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, > 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, > 30 > giTuning ftgen 0, 0, 64, -2, 6, 1.625, 261.63, 60, 1.00, > 1.08428194851, 1.17566734386, 1.2747548784, 1.38219370342, 1.49868768196, > 1.625 ; tuning-table > giLauter ftgen 0, 0, -30, -2, 0 ;ungelöst! > > giSine ftgen 0, 0, 2^10, 10, 1 > > massign 0, 10 > instr 1 > gimaxdur = 16 ;maximaldauer bei einem sehr lauten ton > endin > > instr 10 ;wird durch midi ausgelöst und ruft inumparts instanzen von instr > 100 fuer die teiltoene > inumparts = 24 ;wieviele teiltöne wollen wir > imidinot notnum > icps cpstmid giTuning ;grundfrequenz dieser taste > iamp ampmidi 0.3 > idur = gimaxdur * iamp > indx = 1 ;wir starten beim ersten teilton > isubinstr = 100+imidinot/1000 ;zb 100.060 für c > loop: > ipartamp tab_i indx-1, giPartamps > ipartamp = ipartamp * iamp > ipartfreq tab_i indx-1, giPartfreqs > ipartfreq = ipartfreq * icps > event_i "i", isubinstr, 0, idur, ipartfreq, ipartamp, indx, iamp > loop_le indx, 1, inumparts, loop > krelease release > if krelease == 1 then ;beim note off event > turnoff2 isubinstr, 4, 1 > endif > endin > > > instr 100 ;spielt einen teilton: hohe teiltöne sind kürzer > idur = p3 ;dauer > ifreq = p4 ;teiltonfrequenz > iamp = p5 ;teiltonamplitude > ittnr = p6 ;welcher teilton ist dran > ivel = p7 ;anschlagslautstärke (0-1) > iveldiv = 6 ;mögliche abweichung eines teiltons in db > iveldivfq = 1 ;frequenz für neue zufallswerte dafür > kveldiv randi iveldiv, iveldivfq ;bewegung in dB > kampdiv = ampdb(kveldiv) ;bewegung als lautstärkenfaktor > kvel = ivel * kampdiv ;bewegung bezogen auf ursprüngliche > lautstärke > ;idurtt = (idur / ittnr) * 2 ;das muss man verbessern > asig poscil iamp, ifreq, giSine > aenv expsegr 0.01, 0.01, 1, idur-0.1, .001, .2,.00001 > aout = asig * aenv > > outs aout, aout > endin > > > </CsInstruments> > <CsScore> > f 0 36 > i 1 0 36 > i 10 0 36 > i100 0 36 > </CsScore> > </CsoundSynthesizer> > <CsoundSynthesizer> <CsOptions> ;-odevaudio -Ma -b400 -m0d --midifile=ausschnitt.wav --output=test.wav -Ma -b400 -m0d xeno04c.csd </CsOptions><CsInstruments> sr = 44100 ksmps = 100 nchnls = 2 0dbfs = 1 giPartamps ftgen 0, 0, -30, -2, 0.500804, 0.173136, 0.160991, 0.101076, 0.081932, 0.067141, 0.045805, 0.036794, 0.035306, 0.029838, 0.011930, 0.011010, 0.010675, 0.008733, 0.008409, 0.008226, 0.007619, 0.005701, 0.005513, 0.005106, 0.004824, 0.004630, 0.004250, 0.004002, 0.003883, 0.003451, 0.003443 giPartfreqs ftgen 0, 0, -30, -2, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30 giTuning ftgen 0, 0, 64, -2, 6, 1.625, 261.63, 60, 1.00, 1.08428194851, 1.17566734386, 1.2747548784, 1.38219370342, 1.49868768196, 1.625 ; tuning-table giLauter ftgen 0, 0, -30, -2, 0 ;ungelöst! giSine ftgen 0, 0, 2^10, 10, 1 massign 0, 10 instr 1 gimaxdur = 16 ;maximaldauer bei einem sehr lauten ton endin instr 10 ;wird durch midi ausgelöst und ruft inumparts instanzen von instr 100 fuer die teiltoene inumparts = 24 ;wieviele teiltöne wollen wir imidinot notnum icps cpstmid giTuning ;grundfrequenz dieser taste iamp ampmidi 0.3 idur = gimaxdur * iamp indx = 1 ;wir starten beim ersten teilton isubinstr = 100+imidinot/1000 ;zb 100.060 für c loop: ipartamp tab_i indx-1, giPartamps ipartamp = ipartamp * iamp ipartfreq tab_i indx-1, giPartfreqs ipartfreq = ipartfreq * icps event_i "i", isubinstr, 0, idur, ipartfreq, ipartamp, indx, iamp loop_le indx, 1, inumparts, loop krelease release if krelease == 1 then ;beim note off event turnoff2 isubinstr, 4, 1 endif endin instr 100 ;spielt einen teilton: hohe teiltöne sind kürzer idur = p3 ;dauer ifreq = p4 ;teiltonfrequenz iamp = p5 ;teiltonamplitude ittnr = p6 ;welcher teilton ist dran ivel = p7 ;anschlagslautstärke (0-1) iveldiv = 6 ;mögliche abweichung eines teiltons in db iveldivfq = 1 ;frequenz für neue zufallswerte dafür kveldiv randi iveldiv, iveldivfq ;bewegung in dB kampdiv = ampdb(kveldiv) ;bewegung als lautstärkenfaktor kvel = ivel * kampdiv ;bewegung bezogen auf ursprüngliche lautstärke ;idurtt = (idur / ittnr) * 2 ;das muss man verbessern asig poscil iamp, ifreq, giSine aenv expsegr 0.01, 0.01, 1, idur-0.1, .001, .2,.00001 aout = asig * aenv outs aout, aout endin </CsInstruments> <CsScore> f 0 36 i 1 0 36 i 10 0 36 i100 0 36 </CsScore> </CsoundSynthesizer> https://sourceforge.net/tracker/?group_id=81968&atid=564599 Discussions of bugs and features can be posted here To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound" |
Date | 2010-11-25 15:35 |
From | Rory Walsh |
Subject | [Csnd] Re: Fwd: Re: csd-file doesn't produce a wav-file |
Is it the midi file that's not right? Try the following option and see if you hear anything: |
Date | 2010-11-25 15:46 |
From | Stefan Thomas |
Subject | [Csnd] Re: Re: Fwd: Re: csd-file doesn't produce a wav-file |
Dear Rory, the midi-file is alright. I can listen to it, when I play it with timidity. But I can't hear anything, when I use Your options. Something must be wrong, but I don't see it.
Am 25. November 2010 16:35 schrieb Rory Walsh <rorywalsh@ear.ie>: Is it the midi file that's not right? Try the following option and see |
Date | 2010-11-25 16:14 |
From | Rory Walsh |
Subject | [Csnd] Re: Re: Re: Fwd: Re: csd-file doesn't produce a wav-file |
It would seem that Csound is having trouble with the midi file. Failing that there is problem with your instrument. The only limitation the manual mentions regarding midi has something to do with version 4.x, I assume you're using a later version than that. Are there new allocations of instr 10 throughout the performance? And if so are there new allocations of instr 100 as a result? You should be able to tell from the Csound output... 2010/11/25 Stefan Thomas |
Date | 2010-11-25 16:51 |
From | Stefan Thomas |
Subject | [Csnd] Re: Re: Re: Re: Fwd: Re: csd-file doesn't produce a wav-file |
Dear Rory, the problem has definitely nothing to do with the midi-file. If I use another one the problem still remains, and it seems it would be the the same problem, if You would use any other midi. The thing is: when I use in the csound options -odevaudio -Ma -b400 -m0d I can play with the midi keyboard and I can hear sound. But it does not work, when I want to play a midifile. There are no allocations of instr. 10 or instr. 100. I have the feeling, that the "isubinstrument" causes the the problem, but I don't know. When I run csound xeno04c.csd I get: PortMIDI real time MIDI plugin for Csound virtual_keyboard real time MIDI plugin for Csound PortAudio real-time audio module for Csound 0dBFS level = 32768.0 Csound version 5.12 (double samples) Sep 15 2010 libsndfile-1.0.21 UnifiedCSD: xeno04c.csd STARTING FILE Creating options Herstellen des Orchesters Creating score orchname: /tmp/csound-hNJ9HC.orc scorename: /tmp/csound-OHV58s.sco RAWWAVE_PATH: /usr/share/stk/rawwaves/ rtaudio: PortAudio module enabled ... using blocking interface rtmidi: PortMIDI module enabled orch compiler: instr 100 instr 101 instr 102 sorting score ... ... getan Csound version 5.12 (double samples) Sep 15 2010 midi channel 1 using instr 100 midi channel 2 using instr 100 midi channel 3 using instr 100 midi channel 4 using instr 100 midi channel 5 using instr 100 midi channel 6 using instr 100 midi channel 7 using instr 100 midi channel 8 using instr 100 midi channel 9 using instr 100 midi channel 10 using instr 100 midi channel 11 using instr 100 midi channel 12 using instr 100 midi channel 13 using instr 100 midi channel 14 using instr 100 midi channel 15 using instr 100 midi channel 16 using instr 100 displays suppressed 0dBFS level = 1.0 chnl 1 using instr 101 chnl 2 using instr 101 chnl 3 using instr 101 chnl 4 using instr 101 chnl 5 using instr 101 chnl 6 using instr 101 chnl 7 using instr 101 chnl 8 using instr 101 chnl 9 using instr 101 chnl 10 using instr 101 chnl 11 using instr 101 chnl 12 using instr 101 chnl 13 using instr 101 chnl 14 using instr 101 chnl 15 using instr 101 chnl 16 using instr 101 The available MIDI in devices are: 0: Midi Through Port-0 (ALSA) PortMIDI: Activated input device 0: 'Midi Through Port-0' (ALSA) Reading MIDI file 'ausschnitt.mid'... Track 0 Track 1 Track 2 done. orch now loaded audio buffered in 400 sample-frame blocks writing 1600-byte blks of shorts to test.wav (WAV) SECTION 1: end of midi track in 'ausschnitt.mid' 0 forced decays, 0 extra noteoffs Score finished in csoundPerform(). inactive allocs returned to freespace end of score. overall amps: 0.00000 0.00000 overall samples out of range: 0 0 0 errors in performance 3991 1600-byte soundblks of shorts written to test.wav (WAV) 2010/11/25 Rory Walsh <rorywalsh@ear.ie> It would seem that Csound is having trouble with the midi file. |
Date | 2010-11-25 17:29 |
From | Rory Walsh |
Subject | [Csnd] Re: Re: Re: Re: Re: Fwd: Re: csd-file doesn't produce a wav-file |
Can you try taking out -Ma.. On 25 November 2010 16:51, Stefan Thomas |
Date | 2010-11-25 17:36 |
From | jpff@cs.bath.ac.uk |
Subject | [Csnd] Re: Re: Re: Re: Re: Fwd: Re: csd-file doesn't produce a wav-file |
I remain ignorant about all matters MIDI but do we really handle separate traks in MIDI files? We certainly did not at one time -- something to do with type 0 MIDI Look forward to being proved wrong ==John ff > Reading MIDI file 'ausschnitt.mid'... > Track 0 > Track 1 > Track 2 > done. Send bugs reports to the Sourceforge bug tracker https://sourceforge.net/tracker/?group_id=81968&atid=564599 Discussions of bugs and features can be posted here To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound" |
Date | 2010-11-25 17:47 |
From | Rene Djack |
Subject | [Csnd] Re: Re: Re: Re: Re: Re: Fwd: Re: csd-file doesn't produce a wav-file |
Attachments | ausschnitt_new.csd |
Hi, As i can see on my Ubuntu box, your csd always send midi note to instr 1. massign 0,10 not working ???
I have renamed instr number 1 to 10, 10 to 1 and it is now making some sounds. See attached file. Regards René 2010/11/25 <jpff@cs.bath.ac.uk> I remain ignorant about all matters MIDI but do we really handle separate |
Date | 2010-11-25 20:52 |
From | Stefan Thomas |
Subject | [Csnd] Re: Re: Re: Re: Re: Re: Re: Fwd: Re: csd-file doesn't produce a wav-file |
Dear Rene, thank You. I don't know why, but now it works! Am 25. November 2010 18:47 schrieb Rene Djack <rene.djack@gmail.com>:
|