Csound Csound-dev Csound-tekno Search About

[Csnd] mp3 issues

Date2010-12-30 20:22
Frommenno
Subject[Csnd] mp3 issues
Hi,

i have built Csound from CVS with the scons option "includeMP3=1". And
indeed with this example with opcode "mp3in" it works, but not the example
from GEN49 from the manual. The building process of Csound  revealed no
errors. What could be wrong?
My system is Kubuntu10.04.

thank you,
menno

WORKS:



; 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
  outs ar1, ar2
endin




i 1 0 1.7
e





NO WORKS:



; 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 = 1

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

   ; Play the audio sample stored in Table #1.
   a1 oscil kamp, kcps, ifn
   out 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



WITH THIS OUTPUT:

SECTION 1:
ftable 1:
ftable 1: sfname
f  1     0.00 131072.00    49.00  "beats.mp3" ...
ftable 1: Invalid handle
f  1     0.00 131072.00    49.00  "beats.mp3" ...
new alloc for instr 1:
INIT ERROR in instr 1: Invalid ftable no. 1.000000
a1	oscil.kk	kamp	kcps	ifn	0	
	  B  0.000 - note deleted.  i1 had 1 init errors
Score finished in csoundPerform().
inactive allocs returned to freespace
end of score.		   overall amps:      0.0
	   overall samples out of range:        0
1 errors in performance

Date2010-12-30 22:17
Fromjoachim heintz
Subject[Csnd] Re: mp3 issues
hi menno -
this is not a reply, but one more question, because i just tried to
build csound with includeMP3=1 and it complained not having a library
(though i did apt-get). how did you get it?
best -
	joachim

Am 30.12.2010 21:22, schrieb menno:
> 
> Hi,
> 
> i have built Csound from CVS with the scons option "includeMP3=1". And
> indeed with this example with opcode "mp3in" it works, but not the example
> from GEN49 from the manual. The building process of Csound  revealed no
> errors. What could be wrong?
> My system is Kubuntu10.04.
> 
> thank you,
> menno
> 
> WORKS:
> 
> 
> 
> ; 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
>   outs ar1, ar2
> endin
> 
> 
> 
> 
> i 1 0 1.7
> e
> 
> 
> 
> 
> 
> NO WORKS:
> 
> 
> 
> ; 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 = 1
> 
> ; Instrument #1.
> instr 1
>    kamp = 30000
>    kcps = 1
>    ifn = 1
> 
>    ; Play the audio sample stored in Table #1.
>    a1 oscil kamp, kcps, ifn
>    out 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
> 
> 
> 
> WITH THIS OUTPUT:
> 
> SECTION 1:
> ftable 1:
> ftable 1: sfname
> f  1     0.00 131072.00    49.00  "beats.mp3" ...
> ftable 1: Invalid handle
> f  1     0.00 131072.00    49.00  "beats.mp3" ...
> new alloc for instr 1:
> INIT ERROR in instr 1: Invalid ftable no. 1.000000
> a1	oscil.kk	kamp	kcps	ifn	0	
> 	  B  0.000 - note deleted.  i1 had 1 init errors
> Score finished in csoundPerform().
> inactive allocs returned to freespace
> end of score.		   overall amps:      0.0
> 	   overall samples out of range:        0
> 1 errors in performance
> 
> 


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"

Date2010-12-31 08:49
Frommenno
Subject[Csnd] Re: mp3 issues
pure luck :)
no i found the information on how to get Csound build with mp3 support in
this forum. And i put all the info on this blog page:
http://www.csounds.com/node/1373
i just build Csound with those options there and when installing i get the
question: an older version of Csound was found. Should i remove it? (or
something like that). I answer yes, the old Csound is removed and the new
one installed. 
i hope this works (K)ubuntu10.10 too.

bye
menno