mtytel / cursynth Goto Github PK
View Code? Open in Web Editor NEWGNU ncurses terminal synthesizer
Home Page: http://gnu.org/software/cursynth
License: GNU General Public License v3.0
GNU ncurses terminal synthesizer
Home Page: http://gnu.org/software/cursynth
License: GNU General Public License v3.0
cursynth - a GNU program ------------ cursynth is a polyphonic, MIDI enabled, subtractive synth that runs in your terminal with an ascii interface. cursynth will connect to all MIDI devices and send output to the default audio device on your system. ### Building If you just want to build Cursynth, check out [ftp://ftp.gnu.org/gnu/cursynth] for latest source releases that don't require as much to build. If you want to develop Cursynth, this source is the right place. Run these commands to build the project from source: $ autoreconf -i $ ./configure $ make And then if you want to install, next run: $ sudo make install ### Usage cursynth [--buffer-size OR -b preferred-buffer-size] [--sample-rate OR -s preferred-sample-rate] [--version OR -V] ### Controls * awsedftgyhujkolp;' - a playable keyboard (no key up events) * \`1234567890 - a slider for the current selected control * up/down - previous/next control * left/right - decrement/increment control * F1 (or [shift] + H) - help/controls * [shift] + L - browse/load patches * [shift] + S - save patch * m - arm midi learn * c - erase midi learn ### Requirements: * OS: Mac OSX or GNU/Linux * Terminal: a color enabled terminal with minimum 120x44 ascii characters * If you want key up events, you have to use a MIDI keyboard ### TODO: * Make a LV2 plugin version of cursynth * More modulation sources and destinations * Routable Envelopes * On startup select audio output device * On startup select MIDI input device * Lot's more... Questions? Feature requests? Bugs? email [email protected] Copyright 2013-2015 Matt Tytel <[email protected]>
Hi there!
I'm interested on doing an lv2 plugin version for cursynth.
I already started some work, but I have no idea how to setup autoconf for this.
I have a folder named "lv2" with a "lv2.cpp" file inside (plus the needed lv2 headers for easy building).
If anyone can make the needed autoconf changes, I'll do a pull request for my current code.
(No UI or state save yet, I first need to know the current code works).
thanks!
Would you like to add the configuration script "AX_PTHREAD" to your build specification?
MAKEINFO cursynth.info
./fdl.texi:407: raising the section level of @appendixsubsec which is too low
I'm not sure what this error is.
Got this email, need to look into fixing it!
"""
I tried to configure cursynth with the --with-pulse option, and encountered some problems. Firstly, the rtmidi subpackage does not support pulseaudio, so an alsa (or other) library also needs to be available. Also, the libraries dependencies are not passed back to the cursynth configuration, so that when linking the cursynth binary the libraries needed by rtmidi are not included. This can be overcome by, e.g. using LDFLAGS="-lasound" together with --with-pulse when configuring.
After successfully building with the workarounds mentioned above, however, the cursynth executable exits with the following error:
RtApiPulse::probeDeviceOpen: unsupported sample format.
Examining the cursynth source, I see in cursynth.cpp on line 309, that it's trying to open an rtaudio stream with the RTAUDIO_FLOAT64 sample format, which is unfortunately not supported from the rtaudio pulseaudio interface. I tried changing the FLOAT64 to FLOAT32, but ran into an assertion error in pulseaudio it seems.
"""
Right now you need at least a 120 character wide terminal to run Cursynth.
There should be a more dynamic UI that allows for smaller terminal sizes.
If your terminal is resized, Cursynth should redraw the GUI to fit it better.
Linux version: 3.11.10-301.fc20.x86_64, gcc 4.8.2
Distro: Fedora 20 XFCE Spin
Issue (when running):
RtApiAlsa::getDeviceInfo: snd_pcm_open error for device (hw:0,0), Device or resource busy.
RtApiAlsa::getDeviceInfo: snd_pcm_open error for device (hw:0,0), Device or resource busy.
RtApiAlsa::probeDeviceOpen: pcm device (hw:0,0) won't open for output.
Anyone encountered similar problem?
Also: latest releases on ftp://ftp.gnu.org/gnu/cursynth
don't include cstdlib fix for rand() problem
Would you like to add more error handling for return values from functions like the following?
Hi,
cursynth failed to make on my system with the error:
In file included from mono_panner.cpp:20:0:
wave.h: In static member function 'static mopo::mopo_float mopo::Wave::whitenoise()':
wave.h:245:28: error: 'rand' was not declared in this scope
return (2.0 * rand()) / RAND_MAX - 1;
^
wave.h:245:33: error: 'RAND_MAX' was not declared in this scope
return (2.0 * rand()) / RAND_MAX - 1;
Adding the header <stdlib.h> to mopo/src/wave.h fixed this
When I execute 'make', output this log.
In file included from mono_panner.cpp:20:
./wave.h:258:16: warning: absolute value function 'fabsf' given an argument of type 'double' but has parameter of type 'float' which may cause truncation of value
[-Wabsolute-value]
return fabsf(2.0f - 4.0f * modf(t + 0.75f, &integral)) - 1;
^
./wave.h:258:16: note: use function 'std::abs' instead
return fabsf(2.0f - 4.0f * modf(t + 0.75f, &integral)) - 1;
^~~~~
std::abs
I was trying to compile this (awesome) repo, but I ran into this error :
In file included from mono_panner.cpp:20:0:
wave.h: In static member function ‘static mopo::mopo_float mopo::Wave::whitenoise()’:
wave.h:245:28: error: ‘rand’ was not declared in this scope
return (2.0 * rand()) / RAND_MAX - 1;
^
wave.h:245:33: error: ‘RAND_MAX’ was not declared in this scope
return (2.0 * rand()) / RAND_MAX - 1;
^
Tried building cursynth on Windows using MinGW and msys. It builds successfully, but it needed the following patches to do so. While either ncurses of pdcurses is available on both Linux, BSD and Windows platforms, Windows builds typically use pdcurses. I replaced the link to the ncurses library in src/Makefile with -lpdcurses and the patches switch from the ncurses header to the pdcurses header file on Windows. Might be nicer to give the user the option to pick ncurses or pdcurses instead of defaulting by platform. Also, on most systems mkdir takes to arguments, but on Windows, it just takes one. Windows streams are typically text instead of binary based unless specified as binary.
diff -Naurp src/cursynth-1.4/rtaudio/RtAudio.cpp tmp/cursynth-1.4/rtaudio/RtAudio.cpp
--- src/cursynth-1.4/rtaudio/RtAudio.cpp 2014-01-21 21:31:39 -0500
+++ tmp/cursynth-1.4/rtaudio/RtAudio.cpp
@@ -3558,6 +3558,7 @@ static const char* getAsioErrorString( A
#pragma comment( lib, "winmm.lib" ) // then, auto-link winmm.lib. Otherwise, it has to be added manually.
#endif
+#include <stdio.h>
static inline DWORD dsPointerBetween( DWORD pointer, DWORD laterPointer, DWORD earlierPointer, DWORD bufferSize )
{
if ( pointer > bufferSize ) pointer -= bufferSize;
@@ -7130,6 +7131,9 @@ bool RtApiOss :: probeDeviceOpen( unsign
// Try to open the device.
int fd;
+#ifdef _WIN32
+#ifdef _WIN32
+#include <curses.h>
+#else
+#endif
@@ -56,8 +60,10 @@ namespace {
RtAudioStreamStatus status, void *user_data) {
UNUSED(in_buffer);
UNUSED(stream_time);
+#ifndef _WIN32
if (status)
std::cout << "Stream underflow detected!" << std::endl;
+#endif
mopo::Cursynth* cursynth = static_castmopo::Cursynth*(user_data);
cursynth->processAudio((mopo::mopo_float*)out_buffer, n_frames);
@@ -88,7 +94,11 @@ namespace {
// Check if the directory path exists, if not, create it.
void confirmPathExists(std::string path) {
if (opendir(path.c_str()) == NULL)
+#ifdef _WIN32
mkdir(path.c_str());
+#else
mkdir(path.c_str(), 0755);
+#endif
}
// Returns all files in directory dir with extenstion ext.
diff -Naurp src/cursynth-1.4/src/cursynth_gui.cpp tmp/cursynth-1.4/src/cursynth_gui.cpp
--- src/cursynth-1.4/src/cursynth_gui.cpp 2014-03-15 18:26:00 -0400
+++ tmp/cursynth-1.4/src/cursynth_gui.cpp
@@ -21,7 +21,11 @@
+#ifdef _WIN32
+#include <curses.h>
+#else
+#endif
diff -Naurp src/cursynth-1.4/src/cursynth_gui.h tmp/cursynth-1.4/src/cursynth_gui.h
--- src/cursynth-1.4/src/cursynth_gui.h 2014-02-04 20:43:48 -0500
+++ tmp/cursynth-1.4/src/cursynth_gui.h
@@ -22,7 +22,11 @@
+#ifdef _WIN32
+#include <curses.h>
+#else
+#endif
namespace mopo {
I receive this error message:
$ ./configure
./configure: line 2282: syntax error near unexpected token `-Wall'
./configure: line 2282: `AM_INIT_AUTOMAKE(-Wall -Werror foreign)'
My computer:
$ uname -a
Darwin adius.local 13.1.0 Darwin Kernel Version 13.1.0: Thu Jan 16 19:40:37 PST 2014; root:xnu-2422.90.20~2/RELEASE_X86_64 x86_64
I run cursynth, but get an error message :
RtApiAlsa::probeDeviceOpen: pcm device (hw:0,0) won't open for output.
.. And don't see what it means ...
Have an idea ?
I cloned the github source, and followed these directions:
$ autoreconf -i
$ ./configure
$ make
here is the log:
make all-recursive
make[1]: Entering directory '/home/zane/packages/cursynth'
Making all in cJSON
make[2]: Entering directory '/home/zane/packages/cursynth/cJSON'
make[2]: Nothing to be done for 'all'.
make[2]: Leaving directory '/home/zane/packages/cursynth/cJSON'
Making all in rtaudio
make[2]: Entering directory '/home/zane/packages/cursynth/rtaudio'
make[2]: Nothing to be done for 'all'.
make[2]: Leaving directory '/home/zane/packages/cursynth/rtaudio'
Making all in rtmidi
make[2]: Entering directory '/home/zane/packages/cursynth/rtmidi'
make[2]: Nothing to be done for 'all'.
make[2]: Leaving directory '/home/zane/packages/cursynth/rtmidi'
Making all in mopo
make[2]: Entering directory '/home/zane/packages/cursynth/mopo'
Making all in src
make[3]: Entering directory '/home/zane/packages/cursynth/mopo/src'
CXX mono_panner.o
In file included from mono_panner.cpp:20:0:
wave.h: In static member function ‘static mopo::mopo_float mopo::Wave::whitenoise()’:
wave.h:245:28: error: ‘rand’ was not declared in this scope
return (2.0 * rand()) / RAND_MAX - 1;
^
wave.h:245:33: error: ‘RAND_MAX’ was not declared in this scope
return (2.0 * rand()) / RAND_MAX - 1;
^
Makefile:382: recipe for target 'mono_panner.o' failed
make[3]: *** [mono_panner.o] Error 1
make[3]: Leaving directory '/home/zane/packages/cursynth/mopo/src'
Makefile:330: recipe for target 'all-recursive' failed
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory '/home/zane/packages/cursynth/mopo'
Makefile:446: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/home/zane/packages/cursynth'
Makefile:365: recipe for target 'all' failed
make: *** [all] Error 2
uname -srvmo
:
Linux 3.14.5-1-ARCH #1 SMP PREEMPT Sun Jun 1 07:36:23 CEST 2014 x86_64 GNU/Linux
Seems like there's a samplerate problem here, among other things. Needs some lookings intos.
is this dead?
i will paches for it if it come back
Hey,
I got this issue when I did "./configure" after doing a autoreconf -i from the github source :
"checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
[...a very long list...]
checking for unistd.h... (cached) yes
checking for audio API... ./configure: line 7701: syntax error near unexpected token PULSE,' ./configure: line 7701:
PKG_CHECK_MODULES(PULSE, libpulse-simple, , as_fn_error $? "PulseAudio support requires the pulse-simple library!" "$LINENO" 5)' "
I just wanna let you know, and even have solution from you !
Waiting for your answer guys :)
Elie.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.