hundredrabbits / orca-c Goto Github PK
View Code? Open in Web Editor NEWLive Programming Environment(C Port)
Home Page: http://wiki.xxiivv.com/orca
License: MIT License
Live Programming Environment(C Port)
Home Page: http://wiki.xxiivv.com/orca
License: MIT License
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 connected to the midi out it should send the midi clock pulses as orca does.
Midi sync from other source would be awesome!
@cancel Perhaps you forgot to track the file?
When using a small display, such as the Raspberry Pi touch screen, the list of operators is truncated.
Steps to reproduce:
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?
Any way to change orca colors using .Xresources ?
The ctrl-arrow "jump eight locations" would be very helpful when navigating larger canvases.
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.
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
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?
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.
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.
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.
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 -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!
Compared to electron orca, L is missing it's southwards output
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...
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:
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.
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
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 H
eld *
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.
906b114#diff-1619fa5fe6f90820b2758c463fbcf50cL1251
Isz
is incorrect here. int
is correct. Isz
parameter can overflow and is not guarded correctly. This code should not have been changed and it is now unsafe. It should be reverted.
Why there is only a "save" and "save as file" menu command but not a useful "open file" command.?
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.
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.
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.
after building and executing:
zsh: illegal hardware instruction (core dumped) build/orca
The interactive help (displayed when cursor over operator like in electron orca) would be great to have...
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
I'm on a Mac.
I compiled Orca-c via make. MIDI works, but Pilot stays silent.
Orca (Electron) works fine with Pilot out of the box.
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
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?
The up caret '^' in Orca JS sends Midi continuous control messages & would be super handy to have in Orca-c
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
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
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.
Currently open file from the menu depends on the user being able to spell the exact filename + location. It would be nice to see what’s in the directory structure, tab completion would help as well…
Add IP/Port options for UDP messages (;
)
2AC
.E.
2Ac
.e.
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.