Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Makefile SDL includes dir #23

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
*.o
*.o
.DS_Store

8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
VERSION = 1.1
VERSION = 1.PRO3

FLAGS = -Wall -Wextra -Wno-unused-parameter -g -Wno-unused -O3 -march=nocona -ffast-math \
-DVERSION=$(VERSION) -DPFFFT_SIMD_DISABLE \
-I. -Iext -Iext/imgui -Idep/include -Idep/include/SDL2
-I. -Iext -Iext/imgui -Idep/include -Idep/SDL2-2.0.7/include/
CFLAGS =
CXXFLAGS = -std=c++11
LDFLAGS =
Expand Down Expand Up @@ -31,9 +31,9 @@ ifeq ($(ARCH),lin)
else ifeq ($(ARCH),mac)
# Mac
FLAGS += -DARCH_MAC \
-mmacosx-version-min=10.7
-mmacosx-version-min=10.11
CXXFLAGS += -stdlib=libc++
LDFLAGS += -mmacosx-version-min=10.7 \
LDFLAGS += -mmacosx-version-min=10.11 \
-stdlib=libc++ -lpthread \
-framework Cocoa -framework OpenGL -framework IOKit -framework CoreVideo \
-Ldep/lib -lSDL2 -lsamplerate -lsndfile -ljansson -lcurl
Expand Down
Binary file modified catalog/00Digital/00Sine.wav
Binary file not shown.
Binary file modified catalog/00Digital/01Sawtooth.wav
Binary file not shown.
Binary file modified catalog/00Digital/02Ramp.wav
Binary file not shown.
Binary file modified catalog/00Digital/03Triangle.wav
Binary file not shown.
Binary file modified catalog/00Digital/04Square.wav
Binary file not shown.
Binary file modified catalog/00Digital/05Rectangle.wav
Binary file not shown.
Binary file modified catalog/00Digital/06Trigger.wav
Binary file not shown.
Binary file modified catalog/00Digital/07Rectified Sine.wav
Binary file not shown.
Binary file modified catalog/00Digital/08Chirp 4.wav
Binary file not shown.
Binary file modified catalog/00Digital/09Chirp 16.wav
Binary file not shown.
Binary file modified catalog/00Digital/10Chirp 64.wav
Binary file not shown.
Binary file modified catalog/00Digital/11Mortlet 4.wav
Binary file not shown.
Binary file modified catalog/00Digital/12Mortlet 16.wav
Binary file not shown.
Binary file modified catalog/00Digital/13Mortlet 64.wav
Binary file not shown.
Binary file modified catalog/01Analog/00MOTM-300 Sine Low.wav
Binary file not shown.
Binary file modified catalog/01Analog/01MOTM-300 Sine High.wav
Binary file not shown.
Binary file modified catalog/01Analog/02MOTM-300 Tri Low.wav
Binary file not shown.
Binary file modified catalog/01Analog/03MOTM-300 Tri High.wav
Binary file not shown.
Binary file modified catalog/01Analog/04MOTM-300 Saw Low.wav
Binary file not shown.
Binary file modified catalog/01Analog/05MOTM-300 Saw High.wav
Binary file not shown.
Binary file modified catalog/01Analog/06MOTM-300 Square Low.wav
Binary file not shown.
Binary file modified catalog/01Analog/07MOTM-300 Square High.wav
Binary file not shown.
Binary file modified catalog/02FM/00Sine FM 1.wav
Binary file not shown.
Binary file modified catalog/02FM/01Sine FM 2.wav
Binary file not shown.
Binary file modified catalog/02FM/02Sine FM 3.wav
Binary file not shown.
Binary file modified catalog/02FM/03Sine FM 5.wav
Binary file not shown.
Binary file modified catalog/02FM/04Sine FM 7.wav
Binary file not shown.
Binary file modified catalog/02FM/05Sine FM 11.wav
Binary file not shown.
Binary file modified catalog/02FM/06Sine TZFM 1.wav
Binary file not shown.
Binary file modified catalog/02FM/07Sine TZFM 2.wav
Binary file not shown.
Binary file modified catalog/02FM/08Sine TZFM 3.wav
Binary file not shown.
Binary file modified catalog/02FM/09Sine TZFM 5.wav
Binary file not shown.
Binary file modified catalog/02FM/10Sine TZFM 7.wav
Binary file not shown.
Binary file modified catalog/02FM/11Sine TZFM 11.wav
Binary file not shown.
Binary file modified catalog/02FM/12Sawtooth FM 1.wav
Binary file not shown.
Binary file modified catalog/02FM/13Sawtooth FM 2.wav
Binary file not shown.
Binary file modified catalog/02FM/14Sawtooth FM 3.wav
Binary file not shown.
Binary file modified catalog/02FM/15Sawtooth FM 5.wav
Binary file not shown.
Binary file modified catalog/02FM/16Sawtooth FM 7.wav
Binary file not shown.
Binary file modified catalog/02FM/17Sawtooth FM 11.wav
Binary file not shown.
Binary file modified catalog/03Glitch/00Big-Endian Sine.wav
Binary file not shown.
Binary file modified catalog/03Glitch/01Unsigned Sine.wav
Binary file not shown.
Binary file modified catalog/03Glitch/02Incomplete Sine.wav
Binary file not shown.
Binary file added catalog/04Noise/00White.wav
Binary file not shown.
Binary file added catalog/04Noise/01Pink.wav
Binary file not shown.
Binary file added catalog/04Noise/02Brown.wav
Binary file not shown.
10 changes: 5 additions & 5 deletions dep/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ LOCAL = $(PWD)
include ../Makefile-arch.inc
ifeq ($(ARCH),mac)
export CFLAGS = \
-mmacosx-version-min=10.7
-mmacosx-version-min=10.11
export CXXFLAGS = $(CFLAGS)
export LDFLAGS = $(CFLAGS)
endif
Expand Down Expand Up @@ -38,16 +38,16 @@ $(jansson):
$(libsndfile):
wget -nc http://www.mega-nerd.com/libsndfile/files/[email protected]
tar xf [email protected]
cd $@ && ./configure --prefix="$(LOCAL)"
cd $@ && ./configure --prefix="$(LOCAL)" --enable-external-libs=no
$(MAKE) -C $@
$(MAKE) -C $@ install

$(libsamplerate):
wget -nc http://www.mega-nerd.com/SRC/[email protected]
tar xf [email protected]
cd $@ && ./configure --prefix="$(LOCAL)"
$(MAKE) -C $@
$(MAKE) -C $@ install
cd $@ && ./configure --prefix="$(LOCAL)" --disable-fftw --disable-sndfile
$(MAKE) -C $@/src
$(MAKE) -C $@/src install

$(libcurl):
wget https://curl.haxx.se/download/[email protected]
Expand Down
4 changes: 2 additions & 2 deletions doc/manual.html
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ <h2>Overview</h2>
<p>In <em>WaveEdit</em> and the Synthesis Technology E370 and E352 modules, you can load a bank of wavetables and morph/interpolate between them as they cycle at a particular frequency.</p>
<ul>
<li>A bank contains 64 wavetables</li>
<li>A wavetable contains 256 samples</li>
<li>A wavetable contains 1024 samples</li>
</ul>
<p>In Z mode, all 64 wavetables are positioned on a line, and the Z parameter interpolates wavetables from wave 0 to wave 63.
In XY mode, the wavetables are positioned on an 8x8 grid and interpolated in 2D.</p>
Expand Down Expand Up @@ -119,7 +119,7 @@ <h3>Waveform Editor</h3>
To adjust a single sample without modifying adjacent samples, use the <strong>Grab</strong> tool.
Use the <strong>Line</strong> tool to draw a straight line by dragging and the <strong>Erase</strong> tool to set samples and harmonics to zero as you drag across them.</p>
<p>To the right of the tool selection, you can load a number of preset wavetables from the <code>catalog/</code> subfolders.
You may customize these presets by adding WAV files with 256 samples to a subfolder in the catalog.
You may customize these presets by adding WAV files with 1024 samples to a subfolder in the catalog.
You may even create new subfolders, optionally prefixing the filenames with numbers to alphabetically sort them.</p>
<p>Below the Harmonic display are sliders to adjust the effect amount for the active wavetable.
The meanings of the effects and effect buttons are described in the Effect Editor section.</p>
Expand Down
4 changes: 2 additions & 2 deletions doc/manual.pug
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ html
In *WaveEdit* and the Synthesis Technology E370 and E352 modules, you can load a bank of wavetables and morph/interpolate between them as they cycle at a particular frequency.

- A bank contains 64 wavetables
- A wavetable contains 256 samples
- A wavetable contains 1024 samples

In Z mode, all 64 wavetables are positioned on a line, and the Z parameter interpolates wavetables from wave 0 to wave 63.
In XY mode, the wavetables are positioned on an 8x8 grid and interpolated in 2D.
Expand Down Expand Up @@ -127,7 +127,7 @@ html
Use the **Line** tool to draw a straight line by dragging and the **Erase** tool to set samples and harmonics to zero as you drag across them.

To the right of the tool selection, you can load a number of preset wavetables from the `catalog/` subfolders.
You may customize these presets by adding WAV files with 256 samples to a subfolder in the catalog.
You may customize these presets by adding WAV files with 1024 samples to a subfolder in the catalog.
You may even create new subfolders, optionally prefixing the filenames with numbers to alphabetically sort them.

Below the Harmonic display are sliders to adjust the effect amount for the active wavetable.
Expand Down
17 changes: 11 additions & 6 deletions generate_catalog.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
import scipy.io.wavfile

CATALOG_DIR = "catalog"
SAMPLE_RATE = 44100
NUM_SAMPLES = 256
SAMPLE_RATE = 48000
NUM_SAMPLES = 1024
t = np.linspace(0, 1, NUM_SAMPLES, False)

def saveWAV16(filename, x):
Expand Down Expand Up @@ -102,8 +102,13 @@ def Noise():
saveWAV16("04Noise/%02dBrown.wav" % i, normalize(brown)); i += 1


#def Shepard():
# shepard = np.zeros(NUM_SAMPLES * 64)
# for i in range(128):
# saveWAV16("05Shepard/%03dShepard.wav" % i, normalize(shepard))

shepard = np.zeros(NUM_SAMPLES * 64)
for i in range(128):

saveWAV16("Shepard.wav", )
Digital()
FM()
Glitch()
Noise()
#Shepard()
4 changes: 2 additions & 2 deletions src/WaveEdit.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ unsigned char *base64_decode(const unsigned char *src, size_t len, size_t *out_l
// wave.cpp
////////////////////

#define WAVE_LEN 256
#define WAVE_LEN 1024

enum EffectID {
PRE_GAIN,
Expand Down Expand Up @@ -178,7 +178,7 @@ extern bool clipboardActive;
// bank.cpp
////////////////////

#define BANK_LEN 64
#define BANK_LEN 16
#define BANK_GRID_WIDTH 8
#define BANK_GRID_HEIGHT 8

Expand Down
2 changes: 1 addition & 1 deletion src/audio.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ void audioOpen(int deviceId) {

SDL_AudioSpec spec;
memset(&spec, 0, sizeof(spec));
spec.freq = 44100;
spec.freq = 48000;
spec.format = AUDIO_F32;
spec.channels = 1;
spec.samples = 1024;
Expand Down
2 changes: 1 addition & 1 deletion src/bank.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ void Bank::load(const char *filename) {

void Bank::saveWAV(const char *filename) {
SF_INFO info;
info.samplerate = 44100;
info.samplerate = 48000;
info.channels = 1;
info.format = SF_FORMAT_WAV | SF_FORMAT_PCM_16 | SF_ENDIAN_LITTLE;
SNDFILE *sf = sf_open(filename, SFM_WRITE, &info);
Expand Down
2 changes: 1 addition & 1 deletion src/wave.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ void Wave::randomizeEffects() {

void Wave::saveWAV(const char *filename) {
SF_INFO info;
info.samplerate = 44100;
info.samplerate = 48000;
info.channels = 1;
info.format = SF_FORMAT_WAV | SF_FORMAT_PCM_16 | SF_ENDIAN_LITTLE;
SNDFILE *sf = sf_open(filename, SFM_WRITE, &info);
Expand Down