Csound Csound-dev Csound-tekno Search About

Re: [Cs-dev] GENsone issues

Date2012-01-08 21:32
From"Art Hunkins"
SubjectRe: [Cs-dev] GENsone issues
Hello, Menno,

Your GENsone example is indeed correct. In this context of a brief event, 
not much difference (if any) is heard - in comparison to no envelope 
shaping.

To make what is happening clearer, I've revised your example as follows:
1) added --displays so you can see the amplitude shaping tables generated;
2) added two new versions of f2, here made with GEN16. The first alternate 
is a virtual clone of GENsone (see its display). The second vastly 
accentuates the modified curve, making the shaping much more exponential and 
obvious.

One other observation that applies both to GEN16 and GENsone: I like to give 
a start value of 0 instead of 1. This is permitted. In certain contexts, a 
"shaped" value of 1 can give a sudden amplitude onset when a gradual fadein 
(or fadeout) is intended. (I have run into this occasionally, with MIDI 
control [here the range is 0-127]. Especially when fading out an "always on" 
note, a remnant of the sound can remain when an initial value of 1 is 
"shaped.")

Art Hunkins



; Select audio/midi flags here according to platform
; Audio out   Audio in
-odac   --displays        -iadc         ;;;RT audio I/O
; For Non-realtime ouput leave only the line below:
; -o linseg.wav -W ;;; for file output any platform



; Initialize the global variables.
sr = 44100
kr = 4410
ksmps = 10
nchnls = 2

; Instrument #1 Simple oscillator with loudness correction.
instr 1
  ; p4 = frequency in pitch-class notation.
  kcps = cpspch(p4)

  ; Create an amplitude envelope.
  kenv linseg 0, p3*0.25, 1, p3*0.75, 0
  kamp tablei 16383*kenv, 2

  a1 oscil 30000*kamp, kcps, 1
  outs a1, a1
endin

instr 2
  ; p4 = frequency in pitch-class notation.
  kcps = cpspch(p4)

  ; Create an amplitude envelope.
  kenv linseg 0, p3*0.25, 1, p3*0.75, 0
;  kamp tablei 16383*kenv, 2

  a1 oscil 30000*kenv, kcps, 1
  outs a1, a1
endin




; Table #1, a sine wave.
f 1 0 16384 10 1
f 2 0 16384 "sone" 1 32000 32000 0
;f 2 0 16384 16 1 16384 1.1 32000
;f 2 0 16384 16 1 16384 5 32000

s
; Play Instrument #1 for a half-second, p4=8.00
i 1 0 2 8.00
; Play Instrument #1 for a half-second, p4=8.01
i 1 + . 8.01
; Play Instrument #1 for a half-second, p4=8.02
i 1 + . 8.02
; Play Instrument #1 for a half-second, p4=8.03
i 1 + . 8.03
s
; Play Instrument #1 for a half-second, p4=8.00
i 2 0 2 8.00
; Play Instrument #1 for a half-second, p4=8.01
i 2 + . 8.01
; Play Instrument #1 for a half-second, p4=8.02
i 2 + . 8.02
; Play Instrument #1 for a half-second, p4=8.03
i 2 + . 8.03
e




----- Original Message ----- 
From: "menno" 
To: 
Sent: Sunday, January 08, 2012 10:58 AM
Subject: Re: [Cs-dev] [ csound-Bugs-3469331 ] GENsone issues


> Hi mr. Art Hunkins, everyone
>
> i have made an example that in instr 1 uses the sone function and instr 2
> does not. It should be easy to hear the difference and the effect of sone,
> but i hear no difference. Possibly i make a mistake..
> Can anyone (mr. Art Hunkins?) clarify this?
>
> bye,
> Menno
>


------------------------------------------------------------------------------
Ridiculously easy VDI. With Citrix VDI-in-a-Box, you don't need a complex
infrastructure or vast IT resources to deliver seamless, secure access to
virtual desktops. With this all-in-one solution, easily deploy virtual 
desktops for less than the cost of PCs and save 60% on VDI infrastructure 
costs. Try it free! http://p.sf.net/sfu/Citrix-VDIinabox
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2012-01-09 12:52
Frommenno
SubjectRe: [Cs-dev] GENsone issues
thanks, Art, for your answer.
I think i hear it now, after the slow attack there is a little hump of
amplitude that pushes on,when you expect the release to kick in. That must
be it and i really needed the "exaggerated" version of the GEN16 to put me
on the right track. It's subtle, but it's there.
I lowered the notes by an octave to make even a bit more clear, and now, i
think, this will be a good&simple example for the manual!

thanks again, bye,
Menno


--
View this message in context: http://csound.1045644.n5.nabble.com/csound-Bugs-3469331-GENsone-issues-tp5119216p5131251.html
Sent from the Csound - Dev mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Ridiculously easy VDI. With Citrix VDI-in-a-Box, you don't need a complex
infrastructure or vast IT resources to deliver seamless, secure access to
virtual desktops. With this all-in-one solution, easily deploy virtual 
desktops for less than the cost of PCs and save 60% on VDI infrastructure 
costs. Try it free! http://p.sf.net/sfu/Citrix-VDIinabox
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net