GithubHelp home page GithubHelp logo

hundredrabbits / orca-c Goto Github PK

View Code? Open in Web Editor NEW
467.0 25.0 47.0 927 KB

Live Programming Environment(C Port)

Home Page: http://wiki.xxiivv.com/orca

License: MIT License

Makefile 0.12% C 93.50% Shell 6.39%
livecoding midi osc udp

orca-c's People

Contributors

a773music avatar cancel avatar cmaughan avatar eelfroth avatar ftrvxmtrx avatar juniorctl avatar linearsunrise avatar milligramme avatar neauoire avatar npisanti avatar pangrus avatar russtopia 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

orca-c's Issues

Pitch bend versus Commands list

ORCA-C makes use of ? to bring up a commands list. This is extremely helpful, to the point that I was astonished to find it missing from the original Over there, a ? sends a pitch bend. We should have parity. ? is a smart key to press for help. Pitch bend should likely be something else that's not in use yet like ^ or ~. Whatever we land on, let's make sure it matches in the C port so everything works together.

When using a small display, the list of operators is truncated

When using a small display, such as the Raspberry Pi touch screen, the list of operators is truncated.

Steps to reproduce:

  1. Open orca-c
  2. Open the Main Menu, then select the option to display the list of operators
  3. The list of operator appears

Current result:
The list displays operator A to M, but not N and after.

Expected result:
The list of operator continues on the other side like the Windows version:

Alternative: Maybe allow to navigate/scroll the list using arrow keys?

ctrl-arrow eight-jump

The ctrl-arrow "jump eight locations" would be very helpful when navigating larger canvases.

Random operator ('R') doesn't respect capitalization

The Random operator seems to work differently in Orca-c than regular Orca. In regular Orca the Random ('R') operator's output will have the case (upper or lower) that matches that of the right operand:

 aRD 
  C
-or-
aRd
 c

In Orca-c, however, the output of R seems to be always lowercase, regardless of the case of the input.

Request to build with Visual Studio

Interested in if its possible to somehow PORT a version of this to be able to be built with visual studio ?
i cant seem to get this to build on pc ..
any assiatance would be cool :)

cheers

Undo not working while playing

I was not able to undo. I looked at the code and changed this:

diff --git a/tui_main.c b/tui_main.c
index d525d05..e671915 100644
--- a/tui_main.c
+++ b/tui_main.c
@@ -1854,10 +1854,7 @@ staticni void ged_input_cmd(Ged *a, Ged_input_cmd ev) {
   case Ged_input_cmd_undo:
     if (undo_history_count(&a->undo_hist) == 0)
       break;
-    if (a->is_playing)
-      undo_history_apply(&a->undo_hist, &a->field, &a->tick_num);
-    else
-      undo_history_pop(&a->undo_hist, &a->field, &a->tick_num);
+    undo_history_pop(&a->undo_hist, &a->field, &a->tick_num);
     ged_cursor_confine(&a->ged_cursor, a->field.height, a->field.width);
     ged_update_internal_geometry(a);
     ged_make_cursor_visible(a);

I am very confused why does undo restore the tick? And why is it disabled while playing?

undefined behaviour with more than 16 simultaneous messages

I started having some crashes in my orca patches so i found that orca-c cannot output more than 16 messages simultaneously before having undefinded behavior.

for example this test orca code:

...............D1.....R....D1.....R......................
...............*=14012h....*=a4012s......................
...............D1.....R....D1.....R......................
...............*=24012k....*=b4012v......................
...............D1.....R....D1.....R......................
...............*=34012g....*=c4012h......................
...............D1.....R....D1.....R......................
...............*=44012k....*=d4012z......................
...............D1.....R....D1.....R......................
...............*=54012b....*=e4012x......................
...............D1.....R....D1.....R......................
...............*=64012z....*=f4012o......................
...............D1.....R....D1.....R......................
...............*=740121....*=g4012v......................
...............D1.....R..................................
...............*=84012m..................................
...............D1.....R..................................
...............*=94012c..................................
.........................................................
...........................d1............................
............................=h4012x......................
.........................................................
.........................................................
.........................................................
.........................................................

as soon as the last d is made uppercase will give undefined behavior in release build and it will crash the debug build with some memory dump.

I solved it on my machine by changing the value here from 16 to 32:
https://github.com/hundredrabbits/Orca-c/blob/master/bank.c#L23

@cancel is it safe to do this? as there are 36 possible osc outputs, mixed also with possible midi notes to various channels, i thing we should increase the maximum simultaneous messages to 64 or 128 (maybe someone will want to do some orca black midi someday)

Let me know.

input of B operator not visualized

Hi!
the input for the B operator that should be on the right, is not marked with a different color and uses the same color of the grid. Functionally, it still works, it is just confusing.

Request: Control Orca via UDP

The Javascript version of Orca now can now be controlled via UDP as shown in the following snippet from the README:

Control Orca via UDP

You can send UDP to Orca on port 49161.

p, will start playing.
s, will stop playing.
r, will run the current frame.
g, will return the current frame.
b123, will set the bpm to 123.
f456, will set the frame to 456.
w*12:34, will write *, at 12,

This is a killer feature which would be nice to have in the C version.

Implement Midi Mono operator

Just like Midi, except that it automatically triggers a noteOff for all active notes on that channel, making it easier to use with mono synths.

./tool not working with clang on debian 9

./tool -c clang build release orca 

returns

clang: error: unknown argument: '-no-pie'

also if you install the clang-6.0 package and do

./tool -c clang-6.0 build release orca 

it works as intended, so it is just matter of minimum clang version (default debian is 3.8 )

make release doesn't detect the gcc version but works as intended, so this bug isn't really a priority, but it's still good to know this behavior.

Thanks for the great work on the orca porting!

V operators read output only updated after assignment

I found a peculiarity in orca-c. Variable ('V') operator read outputs are only updated when they occur lexicographically after the first V write operation.

orca-variable-assignment

I would expect for V read operations to work regardless of where they are placed.

Noob Q: Bangs doesn't seams to trigger UDP events to Pilot

Hi, I'm very new to ORCA and Pilot, seams I'm failing to send simple UDP messages from orca-c to Pilot.
There ; doesn't light up when is next to *.

image

I compile orca in a Ubuntu 20.04 laptop.

But the same configuration works perfectly if I tried it on the electron app

Warning under raspbian 10

Hi,

pi@raspberrypi:~/audio $ git clone https://github.com/hundredrabbits/Orca-c.git
Clonage dans 'Orca-c'...
remote: Enumerating objects: 6, done.
remote: Counting objects: 100% (6/6), done.
remote: Compressing objects: 100% (4/4), done.
remote: Total 3373 (delta 2), reused 6 (delta 2), pack-reused 3367
Réception d'objets: 100% (3373/3373), 889.09 KiB | 1.31 MiB/s, fait.
Résolution des deltas: 100% (2282/2282), fait.
pi@raspberrypi:~/audio $ cd Orca-c
pi@raspberrypi:~/audio/Orca-c $ make
sim.c: In function ‘midi_note_number_of’:
sim.c:65:8: warning: conversion from ‘int’ to ‘Glyph’ {aka ‘char’} may change value [-Wconversion]
   g &= ~(1 << 5);                // make uppercase
        ^
Executable program saved as: build/orca
To run it, simply execute it:
$ build/orca

Just to warn you. Orca is working but this little error...

K operator working differently than nodejs version

I just found that the K operator is working differently than in the NodeJs version. To reproduce it just create anything that is reading the Chords from somewhere else like in this example:

martinberlin/Remora@903e371

When reading this:
#C..D....#

The K operator will be stuck in the Chord until the new one comes. The behaviour in the other version is that when there is a silence dot, this will also read, which permits playing no note. If I'm correct this is the right way it should be.

Linking error on linux

I get the following linking error when trying to build ORCA-C:

/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: /tmp/orca.77MRyA.ltrans0.ltrans.o: undefined reference to symbol 'keypad'
/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: /lib64/libtinfow.so.6: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status

This can be solved by linking against tinfow:
0001-fix-linking-error.txt

Bang operator behavior

From Orca's README:

  • bang: Bangs neighboring operands

In both Orca and Orca-c the bang operator * actually only bangs the western and northern neighbors. Other bang sources such as D and F, even when wired with J or Y, as well as a Held * seem to behave in ways similar to the documented in the Orca README.

Input:

11111
1.n.1
1w*e1
1.s.1
11111

Expected output after one tick/frame:

11111
1.*.1
1*.*1
1.*.1
11111

Actual output after one tick/frame:

11111
1.*.1
1*.e1
1.s.1
11111

Disclaimer: I'm writing a clean room (no code from the original) minimal Orca clone with no support for integration with other programs.

Paste from external source

With the JS version, I like the ability to have some blocks of code on a separate txt file and just copy/paste some of them in orca, however, it seems that this doesn't work with this version?
I tried on windows with the cygwin version, using a debian in WSL and remotely from a RPI with Putty.

Homebrew thingy for Mac

It seems like the only reasonable way to get a command-line/terminal program in a usable state onto people's Macs is with Homebrew. I don't really know how Homebrew works internally, though the tool build script I made for orca will check to see if ncurses and portmidi have been installed via Homebrew.

It would be nice if someone could help create a Homebrew thingy (formula? cask? uhh) so that people only have to run 1 command to orca and its dependencies installed and working on a Mac.

Jack midi support

I'd like to be able to use Orca-c in my studio environment so being able to expose a jack midi port would be quite essential.

interactive help

The interactive help (displayed when cursor over operator like in electron orca) would be great to have...

Wrong midi octaves

Hi,
It seems that the midi messages are offsets by -2 octaves. When I send a :13C it triggers the C1 note.

Tested with a raspberry Pi

MIDI Velocity Differences between Orca-JS and Orca-C

Orca-JS and Orca-C send different velocity values when provided with the same arguments. This is most noticable when providing no velocity argument as Orca-JS sends a note-on with full velocity while Orca-C uses a velocity of 1 which is not audible. Below is a table of the velocity values generated from example commands:

Command     Orca-JS    Orca-C

:03C..      127        1 #
:03C0.      No event   1
:03C1.      8          15
:03C2.      16         29
:03C3.      25         43
:03C4.      33         57
:03C5.      42         71
:03C6.      50         85
:03C7.      59         99
:03C8.      67         113
:03C9.      76         127
:03Ca.      84         0
:03Cb.      93         2
:03Cc.      101        7
:03Cd.      110        12
:03Ce.      118        17
:03Cf.      127        22
:03C[g-z].  127        increases by 5 for each letter until z which is 122

won't run on cpu that lacks SSSE3 (?)

note the triple S, it's different then SSE3
(https://en.wikipedia.org/wiki/SSSE3)

I assume it is again that my pc (Athlon64X2) is segfaulting on freshly compiled code like this because it misses this particular instruction set.

Is Orca-C really using this instruction set? Or is it just a feature that could be turned off?

Midi CC operator

The up caret '^' in Orca JS sends Midi continuous control messages & would be super handy to have in Orca-c

"live help" missing

The very useful "live help" display found in electron orca is solely missed :-)

Example: the midi operator (:)
Hovering over the ":" in electron orca displays "Midi" in lower part of the screen
Hovering over the first input (one east) displays "-chann", etc

./tools not working on ubuntu 14.04 Chromebook

Multiple errors of this form:
tui_main.c:1:0: error: bad value (nehalem) for -march= switch

Removed the following from ./tool and was able to compile with out errors:
case $arch in
x86_64) add cc_flags -march=nehalem;;
esac

gcc version 4.8.4 (Ubuntu 4.8.4-2ubuntu1~14.04.4)
Ubuntu 14.04.5 LTS
Intel(R) Core(TM) i3-5015U CPU @ 2.10GHz

GCC 4.9.2 flags errors on Debian Jessie/Oldstable (PocketCHIP)

JIC:
I compiled Orca-c on my PocketCHIP yesterday out of curiosity, ARMv7l, Debian Jessie/oldstable,
GCC 4.9.2
i had to remove the latest two cc_flags "-Werror=incompatible-pointer-types` -Werror=int-conversion" to be able to build orca & cli (not exactly sure of the consequences yet of course)

The GCC errors were:

cc1: error: -Werror=incompatible-pointer-types: no option -Wincompatible-pointer-types
cc1: error: -Werror=int-conversion: no option -Wint-conversion"

// Also echoing #1 with the same two harmless GCC Warnings

Warning: Failed to detect compiler type
Warning: Failed to detect compiler version

(clang-3.8 on Jessie failed with some errors but i'm skipping clang for now as it's OldStable - the CHIPs/PocketCHIP are stuck on it for now...)

I also built Orca-c on macOS with no problem and tested it with Sonic-Pi as an OSC server (using the Plogue MIDI format) on the same machine but i haven't tested sending OSC from the PocketCHIP yet.

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.