Can we send SCAMP output to a .wav file?

Hi, everyone.

I thought I saw one of Marc’s scripts where he added a wav instruction somewhere in the transcribing line at the end, but I can’t find it.

Thanks!

David Collett
Seattle

At the very beginning, after importing scamp, write:

playback_settings.recording_file_path = "rec.wav"

…or whatever you wish to call it!

Marc, thanks for helping. Here’s what I put at the top:

from scamp import Session
playback_settings.recording_file_path = "/Users/davidcollett/Desktop/RhythmExperiment.wav"

but it gives me this error when I run it:

Traceback (most recent call last):
  File "/Volumes/Squallywag/SCAMP and Python files/Rhythm Experiment - by David.py", line 20, in <module>
    playback_settings.recording_file_path = "/Users/davidcollett/Desktop/RhythmExperiment.wav"
NameError: name 'playback_settings' is not defined

What am I doing wrong? Do I need to input some other module?
Thanks.

David

The problem is that you’re only importing session from Scamp. I normally just do from scamp import *, which Imports everything. This is called a wild card import, and some people frown upon it, but I think it’s perfectly fine for little musical Scripts

1 Like