Re: Can't Get Samples to Work

99 views
Skip to first unread message

Sam Aaron

unread,
Apr 27, 2013, 8:35:06 AM4/27/13
to over...@googlegroups.com
Hi there,

this is extremely confusing!

I assume /home/noah/Downloads/stupid.wav exists on your system and is a valid wav file.

How are you starting the server internally or externally?

Could you show me the contents of:

tree ~/.overtone

Sam

---
http://sam.aaron.name


On 27 Apr 2013, at 10:01, saltyk...@gmail.com wrote:

> Running Overtone on my Linux box. The stupid is a very short George Carlin sample.
>
> user> (def stupid (sample "/home/noah/Downloads/stupid.wav"))
> (]Exception Unable to read file - perhaps path is not a valid audio file: /home/noah/Downloads/stupid.wav overtone.sc.buffer/buffer-alloc-read (buffer.clj:149)
> user> (defsample kick (sample (freesound-path 777)))
> --> Asset not cached - starting download...
> --> Downloading file - http://www.freesound.org/api/sounds/777?api_key=47efd585321048819a2328721507ee23
> --> Download successful
> --> Asset not cached - starting download...
> --> Downloading file (31 KB) - http://www.freesound.org/api/sounds/777/serve?api_key=47efd585321048819a2328721507ee23
> 1% (0 B) completed
> 4% (1 KB) completed
> 10% (3 KB) completed
> 17% (5 KB) completed
> 21% (6 KB) completed
> 27% (8 KB) completed
> 34% (10 KB) completed
> 40% (12 KB) completed
> 47% (14 KB) completed
> 51% (15 KB) completed
> 57% (17 KB) completed
> 64% (19 KB) completed
> 70% (21 KB) completed
> 77% (23 KB) completed
> 83% (25 KB) completed
> 89% (27 KB) completed
> 96% (29 KB) completed
> --> Download successful
> Exception Unable to load sample - file does not exist: /home/noah/insane-noises/overtone.sc.sample.PlayableSample@c4dfd7f5 overtone.sc.sample/load-sample* (sample.clj:73)
>
> --
> You received this message because you are subscribed to the Google Groups "Overtone" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to overtone+u...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>

Roger Allen

unread,
Apr 27, 2013, 10:28:53 AM4/27/13
to over...@googlegroups.com
The 2nd issue
Exception Unable to load sample - file does not exist: /home/noah/insane-noises/overtone.sc.sample.PlayableSample@c4dfd7f5  overtone.sc.sample/load-sample* (sample.clj:73)
is because you should (def kick ...), not (defsample kick ...), I think.

saltyk...@gmail.com

unread,
Apr 28, 2013, 3:57:40 PM4/28/13
to over...@googlegroups.com
Apologies Sam, it was written sleep deprived and was not proofread. Yes, stupid.wav is a short George Carlin sample that I downloaded to test out sample functionality. I am connecting to the server internally.

Here is ~/.overtone.tree: . .. assets  config.clj  log  speech.

saltyk...@gmail.com

unread,
Apr 28, 2013, 3:59:05 PM4/28/13
to over...@googlegroups.com
Thanks Roger. I used defsample because I read elsewhere online that that is what I needed to do.

Sam Aaron

unread,
Apr 28, 2013, 4:02:16 PM4/28/13
to over...@googlegroups.com
Hi there,

On 28 Apr 2013, at 20:57, saltyk...@gmail.com wrote:

> Apologies Sam, it was written sleep deprived and was not proofread. Yes, stupid.wav is a short George Carlin sample that I downloaded to test out sample functionality. I am connecting to the server internally.
>
> Here is ~/.overtone.tree: . .. assets config.clj log speech.

does this imply that your assets dir is empty? When I tree ~/.overtone I get quite a long output...

Sam

---
http://sam.aaron.name


Sam Aaron

unread,
Apr 28, 2013, 4:07:14 PM4/28/13
to over...@googlegroups.com
Hi,

On 28 Apr 2013, at 20:59, saltyk...@gmail.com wrote:

> Thanks Roger. I used defsample because I read elsewhere online that that is what I needed to do.

whereabouts did you read this? We should probably clarify correct this.

I've just added a docstring to the defsample macro which is unfortunately absent in the latest release. It now reads:

"Define a s-name as a var in the current namespace referencing a
sample with the specified path and args.

Equivalent to:
(def s-name (sample path args...))"


Sam

---
http://sam.aaron.name

saltyk...@gmail.com

unread,
Apr 28, 2013, 11:26:03 PM4/28/13
to over...@googlegroups.com
Sorry I actually didn't know what you meant as I had never used the tree directory listing program before.

/home/noah/.overtone
├── assets
│   ├── assets.clj
│   ├── www.freesound.org-api-sounds-148431api_key47efd585321048819a2328721507ee23---338834415
│   │   └── 148431api_key47efd585321048819a2328721507ee23---296245624
│   ├── www.freesound.org-api-sounds-148431-serveapi_key47efd585321048819a2328721507ee23---602928431
│   │   └── PIANO_LOUD_C5.wav--523267783
│   ├── www.freesound.org-api-sounds-148432api_key47efd585321048819a2328721507ee23---214761168
│   │   └── 148432api_key47efd585321048819a2328721507ee23---172172377
│   ├── www.freesound.org-api-sounds-148432-serveapi_key47efd585321048819a2328721507ee23--366652592
│   │   └── PIANO_LOUD_C4.wav--522344262
│   ├── www.freesound.org-api-sounds-148479api_key47efd585321048819a2328721507ee23---1141034995
│   │   └── 148479api_key47efd585321048819a2328721507ee23---1098446204
│   ├── www.freesound.org-api-sounds-148479-serveapi_key47efd585321048819a2328721507ee23---1467252275
│   │   └── PIANO_LOUD_B4.wav--493715111
│   ├── www.freesound.org-api-sounds-148488api_key47efd585321048819a2328721507ee23---1713804881
│   │   └── 148488api_key47efd585321048819a2328721507ee23---1671216090
│   ├── www.freesound.org-api-sounds-148488-serveapi_key47efd585321048819a2328721507ee23--1850374639
│   │   └── PIANO_LOUD_A4.wav--465085960
│   ├── www.freesound.org-api-sounds-148503api_key47efd585321048819a2328721507ee23--230708075
│   │   └── 148503api_key47efd585321048819a2328721507ee23--273296866
│   ├── www.freesound.org-api-sounds-148503-serveapi_key47efd585321048819a2328721507ee23--1118971563
│   │   └── PIANO_LOUD_G4.wav--636860866
│   ├── www.freesound.org-api-sounds-148506api_key47efd585321048819a2328721507ee23--602927816
│   │   └── 148506api_key47efd585321048819a2328721507ee23--645516607
│   ├── www.freesound.org-api-sounds-148506-serveapi_key47efd585321048819a2328721507ee23---267252664
│   │   └── PIANO_LOUD_F4.wav--608231715
│   ├── www.freesound.org-api-sounds-148513api_key47efd585321048819a2328721507ee23---217988564
│   │   └── 148513api_key47efd585321048819a2328721507ee23---175399773
│   ├── www.freesound.org-api-sounds-148513-serveapi_key47efd585321048819a2328721507ee23--1111212204
│   │   └── PIANO_LOUD_D4.wav--550973413
│   ├── www.freesound.org-api-sounds-148524api_key47efd585321048819a2328721507ee23---542611956
│   │   └── 148524api_key47efd585321048819a2328721507ee23---500023165
│   ├── www.freesound.org-api-sounds-148524-serveapi_key47efd585321048819a2328721507ee23--2073033868
│   │   └── PIANO_LOUD_E4.wav--579602564
│   ├── www.freesound.org-api-sounds-2086api_key47efd585321048819a2328721507ee23---803437966
│   │   └── 2086api_key47efd585321048819a2328721507ee23---1183281495
│   ├── www.freesound.org-api-sounds-2086-serveapi_key47efd585321048819a2328721507ee23---2026195854
│   │   └── KK_set2.wav---2018529267
│   ├── www.freesound.org-api-sounds-777api_key47efd585321048819a2328721507ee23--2034706565
│   │   └── 777api_key47efd585321048819a2328721507ee23---55756434
│   └── www.freesound.org-api-sounds-777-serveapi_key47efd585321048819a2328721507ee23--1617379397
│       └── 808_kick.wav---609616797
├── config.clj
├── log
│   ├── overtone.log
│   ├── overtone.log.0
│   ├── overtone.log.0.lck
│   ├── overtone.log.1
│   ├── overtone.log.1.lck
│   └── overtone.log.lck
└── speech

saltyk...@gmail.com

unread,
Apr 28, 2013, 11:29:13 PM4/28/13
to over...@googlegroups.com
It was nowhere "official" and I can't find it. On the Github Wiki it is correct, but I didn't read that section until today.

Noah

Sam Aaron

unread,
Apr 29, 2013, 2:02:06 AM4/29/13
to over...@googlegroups.com
Hi Noah,

so it looks like there are some samples cached in your ~/.overtone directory.

What's the return value when you type into the REPL:

(freesound-path 777)

Sam

---
http://sam.aaron.name

saltyk...@gmail.com

unread,
Apr 30, 2013, 11:46:41 PM4/30/13
to over...@googlegroups.com
I cloned a fresh copy of Overtone and samples are working, however, now I have another issue.

When I run

(defsynth foo [in-bus 0]
  (let [sig (sound-in)
        sig (pitch-shift sig 0.2 2)]
    (out 0 sig)))

my microphone works. When I run

(recording-start "~/Desktop/foo.wav")
;;make some noise...
(demo (pan2 (sin-osc)))
(recording-stop)

my it doesn't, but the sine wave is captured.

Sam Aaron

unread,
May 1, 2013, 3:50:47 AM5/1/13
to over...@googlegroups.com
Hi there,

On 1 May 2013, at 04:46, saltyk...@gmail.com wrote:

> my it doesn't, but the sine wave is captured.
>

Apologies, I don't fully understand your question.

If I do the following in this sequence, I hear the foo synth and the sin-osc in the recording:

(defsynth foo [in-bus 0]
(let [sig (sound-in)
sig (pitch-shift sig 0.2 2)]
(out 0 sig)))

(recording-start "~/Desktop/foo.wav")
;;make some noise...
(foo)
(demo (pan2 (sin-osc)))
(recording-stop)
(stop)

Was this the issue, or did I misunderstand?

Sam

---
http://sam.aaron.name

saltyk...@gmail.com

unread,
May 1, 2013, 7:32:49 PM5/1/13
to over...@googlegroups.com
Ahh apologies again; I am going to make sure to check my posts better for coherence before sending them off. What I was trying to say is that when I run the first program my microphone works and the incoming sound is pitch shifted as expected. When I run the latter program, no sounds I make are recorded through the microphone. However, if I generate sound from within overtone, that sound is recorded into the .wav file it outputs.

Noah

Sam Aaron

unread,
May 2, 2013, 4:55:48 AM5/2/13
to over...@googlegroups.com
Hi Noah,

Unfortunately, I still don't fully understand what you're trying to do:

"When I run the latter program, no sounds I make are recorded through the microphone."

I assume, you mean, "when I run the latter program, no sounds are recorded when I make noise into the microphone".

Could you try the following steps:

;;1. define this synth
(defsynth foo [in-bus 0]
(let [sig (sound-in)
sig (pitch-shift sig 0.2 2)]
(out 0 sig)))

;;2. start the synth
(foo)

;;3. start recording
(recording-start "~/Desktop/foo.wav")


;;4. make some noise...
(demo (pan2 (sin-osc)))

;;5. stop recording
(recording-stop)

;;6. Listen to the recording and see if you can hear any noise from the mic.

Sam

---
http://sam.aaron.name
Reply all
Reply to author
Forward
0 new messages