Re: outline for chrono-proportional score
Date | 2017-01-22 20:30 | ||||
From | Andrea Strappa | ||||
Subject | Re: outline for chrono-proportional score | ||||
thank you Victor! Very useful!
Below there's the file correct with your help
(file name path should be replaced for testing, of course).
But there's some line unexpected in second png file
processed.
Maybe is there some critical question on management
of images with csound?
Andrea S.
<CsoundSynthesizer>
<CsOptions> ;-n -odac ;-o image_prova_13.wav </CsOptions> <CsInstruments> sr=44100 ksmps=1 nchnls=1 0dbfs=1 gasig init 0
giimagew = 1000 ;image width in pixel giimageh = 100 ;image high in pixel giimage imagecreate giimagew, giimageh gicount init 0 ;saved images counter instr 1 ;out process example
ifreq = cpspch(9.00) iexpfun ftgen 1, 0, 16384, 5, 1, 8196, .1, 8196, 1 kintvl oscil 1, .35, 1 asig mpulse 1, kintvl gasig reson asig, ifreq, 20 out gasig * .07 endin instr 90 ;draw outline
iimgsec = p4 ;secs for every image, refresh time reset: timout 0, iimgsec, draw schedule 91, 0, .5 reinit reset draw: kx line 0, iimgsec, 1 ;iimgsec = HOW MANY SECONDS IN A PNG FILE ay follow gasig, .001 ;instr out profile imagesetpixel giimage, kx, 1-ay, 1, 1, 1 endin instr 91 ;save file
if gicount == 0 goto next ;--------- ifn = gicount ;routine for series of file names with numeric progression Sname sprintf "C:\Andrea\csound\prove_varie\image_%02d.png", ifn Smsg sprintf "The file name is: '%s'", Sname puts Smsg, 1 ;--------- imagesave giimage, Sname imagefree giimage giimage imagecreate giimagew, giimageh next: gicount = gicount + 1 print gicount endin </CsInstruments> <CsScore>
f0 z ;indefinited performance duration to ensure 'schedule' activation i1 0 10 i90 0 14 4 ;p4 = iimgsec. Remember to set p3 = 'iimgsec' + p3 of out instr ;i3 is an instrument activated by 'schedule' e </CsScore> </CsoundSynthesizer>
|
Date | 2017-01-22 20:38 | ||||
From | Victor Lazzarini | ||||
Subject | Re: outline for chrono-proportional score | ||||
Sorry, can't help you there, I don't know anything about png files.
Victor Lazzarini Dean of Arts, Celtic Studies, and Philosophy
Maynooth University
Ireland
|
Date | 2017-01-25 19:27 | ||||
From | Oeyvind Brandtsegg | ||||
Subject | Re: outline for chrono-proportional score | ||||
Hi Andrea, I tested the csd and it seems to run (sort of) fine here. I don't fully understand how it should exit, and it hangs (just stays open) after producing 3 images. I needed to terminate csound with Ctrl+C The images are black with some white downward exponential slopes The console print is SECTION 1: new alloc for instr 1: ftable 1: ftable 1: 16384 points, scalemax 1.000 _ . . '. .' '._ _-' -. .- '-._ _.-' -._ _.- ''-._ _.-'' ''--.__ __.--'' '''--...._______....--''' new alloc for instr 90: new alloc for instr 91: instr 91: gicount = 1.000 rtevent: T 4.000 TT 4.000 M: 0.91419 The file name is: 'image_01.png' instr 91: gicount = 2.000 rtevent: T 8.000 TT 8.000 M: 0.91410 The file name is: 'image_02.png' instr 91: gicount = 3.000 rtevent: T 12.000 TT 12.000 M: 0.91325 The file name is: 'image_03.png' instr 91: gicount = 4.000 csound command: Interrupt csoundPerform(): stopped. inactive allocs returned to freespace end of score. overall amps: 0.91419 overall samples out of range: 0 0 errors in performance best Oeyvind 2017-01-22 12:38 GMT-08:00 Victor Lazzarini <Victor.Lazzarini@nuim.ie>:
Oeyvind Brandtsegg Professor of Music Technology NTNU 7491 Trondheim Norway Cell: +47 92 203 205 http://www.partikkelaudio.com/ http://crossadaptive.hf.ntnu.no http://gdsp.hf.ntnu.no/ http://soundcloud.com/brandtsegg http://flyndresang.no/ http://soundcloud.com/t-emp |