Coder Social home page Coder Social logo

mtytel / cursynth Goto Github PK

View Code? Open in Web Editor NEW
444.0 36.0 64.0 1.47 MB

GNU ncurses terminal synthesizer

Home Page: http://gnu.org/software/cursynth

License: GNU General Public License v3.0

C 37.76% C++ 58.83% Python 0.23% Objective-C 3.12% Shell 0.06%

cursynth's Introduction

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]>

cursynth's People

Contributors

darrengarvey avatar iyoko avatar mahmoudelbadry avatar mtytel avatar nathanbrooks avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cursynth's Issues

LV2 version

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!

Makeinfo issue in installation

MAKEINFO cursynth.info
./fdl.texi:407: raising the section level of @appendixsubsec which is too low

I'm not sure what this error is.

Fix Pulse Audio Issues

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.
"""

Allow for smaller terminal sizes.

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.

Device or resource busy : Fedora 20 issue

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

minor compile issue in mopo/src/wave.h

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

Compile error on osx

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

Rand() was not declared in this scope.

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;
                                 ^

building on Windows

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

  • flags |-= O_BINARY;
    +#endif
    fd = open( ainfo.devnode, flags, 0 );
    if ( fd == -1 ) {
    if ( errno == EBUSY )
    diff -Naurp src/cursynth-1.4/src/cursynth.cpp tmp/cursynth-1.4/src/cursynth.cpp
    --- src/cursynth-1.4/src/cursynth.cpp 2014-02-04 20:43:48 -0500
    +++ tmp/cursynth-1.4/src/cursynth.cpp
    @@ -22,7 +22,11 @@

include <dirent.h>

include

include

+#ifdef _WIN32
+#include <curses.h>
+#else

include <ncurses.h>

+#endif

include

include

include <stdio.h>

@@ -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 @@

    include <libintl.h>

    include <locale.h>

    include <math.h>

    +#ifdef _WIN32
    +#include <curses.h>
    +#else

    include <ncurses.h>

    +#endif

    include <stdlib.h>

    include

    include <unistd.h>

    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 @@

    include "cursynth_common.h"

    include

    +#ifdef _WIN32
    +#include <curses.h>
    +#else

    include <ncurses.h>

    +#endif

    include

    namespace mopo {

Can't install it on Mac

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

make install / fatal error / ncurses.h ... not found ...

  • Here is an error that occures after 'make install' command:
    "...
    cursynth_gui.h:25:10: fatal error: ncurses.h: Aucun fichier ou dossier de ce type
    25 | #include <ncurses.h>
    | ^~~~~~~~~~~
    compilation terminated.
    ..."
  • And i don't found it among the files I got from Github ... Have you missed it, or do we have to get it somewherelse ?
  • Thanks !

Fails to build on arch linux (3.14.5-1-ARCH)

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

Fix JACK issues

Seems like there's a samplerate problem here, among other things. Needs some lookings intos.

is this dead

is this dead?
i will paches for it if it come back

./configure Issue

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.