LISTSERV mailing list manager LISTSERV 16.5

Help for CSOUND Archives


CSOUND Archives

CSOUND Archives


CSOUND@LISTSERV.HEANET.IE


View:

Message:

[

First

|

Previous

|

Next

|

Last

]

By Topic:

[

First

|

Previous

|

Next

|

Last

]

By Author:

[

First

|

Previous

|

Next

|

Last

]

Font:

Proportional Font

LISTSERV Archives

LISTSERV Archives

CSOUND Home

CSOUND Home

CSOUND  November 2017

CSOUND November 2017

Subject:

empty string

From:

Menno Knevel <[log in to unmask]>

Reply-To:

A discussion list for users of Csound <[log in to unmask]>

Date:

Wed, 22 Nov 2017 11:57:07 -0700

Content-Type:

text/plain

Parts/Attachments:

Parts/Attachments

text/plain (98 lines)

Goode evening,
i'm using Blue - hence the <blah> you see in the code here and there; they
are values of Blue widgets. The text however is all Csound.

I think my question is a more general one, so i ask it here.

I've made a effect, using Blue that is in the form of a UDO.
it is a ringmodulator i can choose between 5 options:
- sine
- saw
- square
- pulse
- soundfile

When i open the effect, there is not yet a soundfile present, so 'isamp' is
empty. Thing is, when i run it, i get no error, but the sine, square  etc.
don't work either. Result is complete silence...
I am looking for a trick that allows the soundfile to be empty but the other
waves should work.

I've tried with filevalid and srtlen >0 as you can see here, but it does not
do what i want.
This is the line that calls for the soundfile: 
elseif (<wave> == 4) && (strlen("<sample>") > 0) then

here is part of the code:
isine	ftgentmp 0, 0, 16384, 10, 1
isaw	ftgentmp 0, 0, 16384, 10, 1, 0.5, 0.3, 0.25, 0.2, 0.167, 0.14, 0.125,
.111
isquare	ftgentmp 0, 0, 16384, 10, 1, 0, 0.3, 0, 0.2, 0, 0.14, 0, .111
ipulse  	ftgentmp 0, 0, 16384, 10, 1, 1, 1, 1, 0.7, 0.5, 0.3, 0.1
isamp	ftgentmp 0, 0, 0, 1, "<sample>", 0, 0, 0

kcarcoarse  = <carrier_coarse> * 1000                                          
;coarse tuning of freq
kcarrier    =   <carrier_fine> + kcarcoarse                                    
;add coarse and fine tuning together

if (<wave> == 0) then                                                          
;provide sinoid for modulation
    acarrierL    poscil .5, kcarrier, isine, 0
    acarrierR    poscil .5, kcarrier, isine, .5
elseif (<wave> == 1) then
    acarrierL    poscil .5, kcarrier, isaw, 0 
    acarrierR    poscil .5, kcarrier, isaw, .5                                         
elseif (<wave> == 2) then
    acarrierL    poscil .5, kcarrier, isquare, 0
    acarrierR    poscil .5, kcarrier, isquare, .5
elseif (<wave> == 3) then
    acarrierL    poscil .5, kcarrier, ipulse, 0
    acarrierR    poscil .5, kcarrier, ipulse, .5
elseif (<wave> == 4) && (strlen("<sample>") > 0) then
    ichn filenchnls "<sample>"
    ilen filelen "<sample>"
    kbegin  =   <start> * ilen + 0.05                                      
    kend    =   <end> * ilen
        if (ichn == 1) then
            if (kbegin < kend) then
                acarrierL    flooper2 .8, <pitch>, kbegin, kend, .1, isamp, 
i(<start_sample>) * ilen
                acarrierR   =   acarrierL
            else
                acarrierL   =   0
                acarrierR   =   0
            endif
        else
            if (kbegin < kend) then
                ar1, ar2    flooper2 .8, <pitch>, kbegin, kend, .1, isamp, 
i(<start_sample>) * ilen
                acarrierL    =   (ar1 + ar2) * .6
                acarrierR   =   acarrierL
            else
                acarrierL   =   0
                acarrierR   =   0
            endif
        endif
;else
;                acarrierL   =   0
;                acarrierR   =   0
;endif

endif

Is there a nice solution so that the soundfile can remain empty and still
the other waves can do their ringmodulate stuff?



--
Sent from: http://csound.1045644.n5.nabble.com/Csound-General-f1093014.html

Csound mailing list
[log in to unmask]
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here

Top of Message | Previous Page | Permalink

Advanced Options


Options

Log In

Log In

Get Password

Get Password


Search Archives

Search Archives


Subscribe or Unsubscribe

Subscribe or Unsubscribe


Archives

December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
December 2015
November 2015
October 2015

ATOM RSS1 RSS2



LISTSERV.HEANET.IE

Secured by F-Secure Anti-Virus CataList Email List Search Powered by the LISTSERV Email List Manager