Csound Csound-dev Csound-tekno Search About

[Csnd] Gen 49

Date2011-01-09 19:29
Fromfrancesco
Subject[Csnd] Gen 49
Hi all,
trying Gen 49 example for loading mp3 file. A part a wrong pitch in oscil
opcode,
that i have corrected (in my example) i have an interrupt output, like if
reading
just the first part of audio file.

Some advice?

csound, build today, ubuntu 10.04.

ciao,
francesco.

Date2011-01-10 09:05
Frommenno
Subject[Csnd] Re: Gen 49
just wanted to say that i have the same faulty behaviour with Gen 49,
Francesco (csound doubles from 9 januari, Ubuntu). Perhaps when you file the
bug it can get repaired in time before version 5.13 is released?

greetings
menno

Date2011-01-10 09:14
Fromjpff@cs.bath.ac.uk
Subject[Csnd] Re: Re: Gen 49
Does it also go wrong with mp3in ?

And an example?

==John ff


> just wanted to say that i have the same faulty behaviour with Gen 49,
> Francesco (csound doubles from 9 januari, Ubuntu). Perhaps when you file
> the
> bug it can get repaired in time before version 5.13 is released?
>
> greetings
> menno




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"

Date2011-01-10 09:30
Frommenno
Subject[Csnd] Re: Re: Gen 49
hello John,

no with mp3in everything works allright.
But with this example things go wrong:




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



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

; Instrument #1.
instr 1
   kamp = 30000
   kcps = .3
   ifn = 1

   ; Play the audio sample stored in Table #1.
   a1 oscil kamp, kcps, ifn
   outs a1, a1
endin





; Table #1: read an audio file (using GEN49).
f 1 0 131072 49 "beats.mp3" 0 1

; Play Instrument #1 for 2 seconds.
i 1 0 2
e





First of all, like Francesco says, there is an interupt, a "hole" in the
sound; the sound starts, then silence, then it continues.
And kcps has to be set to about 0.3 to get the right pitch.
Also: i have "beats.mp3" in SSDIR but it not found, i have to give the whole
path to the file to be found.
beats.mp3 is found however when using this example with mp3in:




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



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

; Instrument #1.
instr 1
iskptim	=	.3
ibufsize	=	64
; Reads stereo audio data from an external MP3 file
ar1, ar2	 mp3in "beats.mp3", iskptim, 0, 0, ibufsize


  out ar1, ar2
endin






; Play Instrument #1 for three seconds.
i 1 0 1.7
e






menno

Date2011-01-10 12:33
Fromjpff@cs.bath.ac.uk
Subject[Csnd] Re: Re: Re: Gen 49
"Thank you..." (grrrrh)

The search path was code I never finished, and there was a comment to
remind me to do it.  Now seems to work

Why gen49 is nor reading the data correctly is totally beyond me at
present.  Code looks right to me.  Could be the underlying library has
priblems with the "read mono" configuration but that seems unlikely.

Still looking
==John ff



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"

Date2011-01-10 14:08
Fromjpff@cs.bath.ac.uk
Subject[Csnd] Re: Re: Re: Re: Gen 49
Fixed in CVS I think



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"

Date2011-01-10 15:47
Frommenno
Subject[Csnd] Re: Re: Re: Re: Gen 49
It finds SSDIR now and the interrupt is gone, but there is still something
not quite right. When i play this csd below it plays the mp3 then half a
second silence, then it plays the mp3 again etcetera. A kind of loop with a
small silence.
And i notice a big difference in degradation between the mp3in opcode and
when using gen49. 
Gen49 sounds good, especially since the compression is high (64kps), while
using the same mp3 with mp3in sounds heavily distorted here. With gen49 i
can change the format and create some weird distortion too but never quite
like the mp3in opcode (that has no possibility to change format yet).

 don't shoot the messenger...:)
Csound doubles 10 jan., Ubuntu.

greetings
menno



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



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

; Instrument #1.
instr 1
   kamp = 30000
   kcps = .35
   ifn = 1

   ; Play the audio sample stored in Table #1.
   a1 oscil kamp, kcps, ifn
   outs a1, a1
endin





; Table #1: read an audio file (using GEN49).
f 1 0 131072 49 "beats.mp3" 0 1

; Play Instrument #1 for 2 seconds.
i 1 0 20
e









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



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

; Instrument #1.
instr 1
iskptim	=	0
ibufsize	=	64
; Reads stereo audio data from an external MP3 file
ar1, ar2	 mp3in "beats.mp3", iskptim, 0, 0, ibufsize


  out ar1, ar2
endin






; Play Instrument #1 for three seconds.
i 1 0 10
e




Date2011-01-10 17:51
Fromjpff@cs.bath.ac.uk
Subject[Csnd] Re: Re: Re: Re: Re: Gen 49
>
> It finds SSDIR now and the interrupt is gone, but there is still something
> not quite right. When i play this csd below it plays the mp3 then half a
> second silence, then it plays the mp3 again etcetera. A kind of loop with
> a
> small silence.

The beats.mp3 file is 91,008 sampkes long, so placing in a table 131072
long will leave silence at the end, so thi sis as I would expect.


> And i notice a big difference in degradation between the mp3in opcode and
> when using gen49.

Strange -- it is the same code!  Not sure what to do about this.
I have seen a distortion from mp3in but that seems to be in the library.

As I have said before I do nor use mp3 files and until the warm weather I
only have lofi sound.  I cam compare outputs if I have a clear example

>  don't shoot the messenger...:)

I do not have any shooting device....

==John ff





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"