CocoTeens7 - Hit The Tune: Difference between revisions

From SGMK-SSAM-WIKI
Jump to navigation Jump to search
No edit summary
No edit summary
Line 4: Line 4:


[https://github.com/CocoMake7/CocoTeens7 https://github.com/CocoMake7/CocoTeens7]
[https://github.com/CocoMake7/CocoTeens7 https://github.com/CocoMake7/CocoTeens7]
== Wav2Sketch ==
For playing wav file from memory, there is AudioPlayMemory class from teensy audio library.
More infos: [https://www.pjrc.com/teensy/td_libs_AudioPlayMemory.html https://www.pjrc.com/teensy/td_libs_AudioPlayMemory.html]
MacOS and *nix users need to compile the sample conversion software "wav2sketch" from command line.
The C source can be downloaded here:
[https://raw.githubusercontent.com/PaulStoffregen/Audio/master/extras/wav2sketch/wav2sketch.c https://raw.githubusercontent.com/PaulStoffregen/Audio/master/extras/wav2sketch/wav2sketch.c]
Next to the wav2sketch.c source file, a "makefile" must be present to compile the program.
Copy&paste the makefile below to a file called "makefile" without file extension. Open a terminal in the directory, where "wav2sketch.c" and "makefile" is present and type "make".
You need basic development tools installed (gcc).
Makefile (for Mac OS/*nix users):
<syntaxhighlight lang="make">
CC = gcc
CFLAGS = -O -Wall
all: wav2sketch
.c.o:
$(CC) $(CFLAGS) -c $<
wav2sketch: wav2sketch.o
$(CC) -o wav2sketch wav2sketch.o
clean:
rm -f *.o
</syntaxhighlight>

Revision as of 20:36, 30 September 2016

Code

https://github.com/CocoMake7/CocoTeens7


Wav2Sketch

For playing wav file from memory, there is AudioPlayMemory class from teensy audio library.

More infos: https://www.pjrc.com/teensy/td_libs_AudioPlayMemory.html

MacOS and *nix users need to compile the sample conversion software "wav2sketch" from command line.

The C source can be downloaded here: https://raw.githubusercontent.com/PaulStoffregen/Audio/master/extras/wav2sketch/wav2sketch.c

Next to the wav2sketch.c source file, a "makefile" must be present to compile the program.

Copy&paste the makefile below to a file called "makefile" without file extension. Open a terminal in the directory, where "wav2sketch.c" and "makefile" is present and type "make". You need basic development tools installed (gcc).

Makefile (for Mac OS/*nix users):

CC = gcc

CFLAGS = -O -Wall

all: wav2sketch

.c.o:
	$(CC) $(CFLAGS) -c $<

wav2sketch: wav2sketch.o
	$(CC) -o wav2sketch wav2sketch.o

clean:
	rm -f *.o