aboutsummaryrefslogtreecommitdiff
path: root/supercollider/k_sc~
diff options
context:
space:
mode:
authorKjetil S. Matheussen <ksvalast@users.sourceforge.net>2004-02-02 14:12:47 +0000
committerKjetil S. Matheussen <ksvalast@users.sourceforge.net>2004-02-02 14:12:47 +0000
commite3f67bd77b72fbaeb643792a2d1f9decddbccbbe (patch)
tree4b5f2a042050dab852079a9bd303f81e79048cf2 /supercollider/k_sc~
parent9c15b7f87cb04a6deb5b7387edc51d43a35224f9 (diff)
k_jack-tilde is much better than k_sc~. Remove.
svn path=/trunk/; revision=1309
Diffstat (limited to 'supercollider/k_sc~')
-rw-r--r--supercollider/k_sc~/README24
-rwxr-xr-xsupercollider/k_sc~/gendasc.py49
-rw-r--r--supercollider/k_sc~/help-k_sc~.pd8
-rw-r--r--supercollider/k_sc~/k_sc~.c147
-rw-r--r--supercollider/k_sc~/makefile90
5 files changed, 0 insertions, 318 deletions
diff --git a/supercollider/k_sc~/README b/supercollider/k_sc~/README
deleted file mode 100644
index 87cafa59..00000000
--- a/supercollider/k_sc~/README
+++ /dev/null
@@ -1,24 +0,0 @@
-
-
-k_sc~ v0.0.1
-
-
-k_sc~ requires you to use Jack as the audio API for PD.
-It is an external that automaticly routes the audio
-between PD and the Supercollider synth.
-
-It provides two objects:
-
-1. [from_sc~] Receives sound from Supercollider.
- Syntax is the same as the [adc~] object.
-
-2. [to_sc~] Sends sound to Supercollider.
- Syntax is the same as the [dac~] object.
-
-
-Kjetil S. Matheussen
-k.s.matheussen@notam02.no
-
-
-
-
diff --git a/supercollider/k_sc~/gendasc.py b/supercollider/k_sc~/gendasc.py
deleted file mode 100755
index a68cc140..00000000
--- a/supercollider/k_sc~/gendasc.py
+++ /dev/null
@@ -1,49 +0,0 @@
-#!/usr/bin/env python
-
-#/* --------------------------- gendasc ----------------------------------- */
-#/* ;; Kjetil S. Matheussen, 2004. */
-#/* */
-#/* This program is free software; you can redistribute it and/or */
-#/* modify it under the terms of the GNU General Public License */
-#/* as published by the Free Software Foundation; either version 2 */
-#/* of the License, or (at your option) any later version. */
-#/* */
-#/* This program is distributed in the hope that it will be useful, */
-#/* but WITHOUT ANY WARRANTY; without even the implied warranty of */
-#/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
-#/* GNU General Public License for more details. */
-#/* */
-#/* You should have received a copy of the GNU General Public License */
-#/* along with this program; if not, write to the Free Software */
-#/* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-#/* */
-#/* ---------------------------------------------------------------------------- */
-
-
-import sys,string,xreadlines
-
-
-path=sys.argv[1]
-if path[-1]=="/":
- filename=path+"d_dac.c"
-else:
- filename=path+"/"+"d_dac.c"
-
-
-success=0
-for line in xreadlines.xreadlines(open(filename,"r")):
- line=string.replace(line,'adc','from_sc')
- line=string.replace(line,'dac','to_sc')
- line=string.replace(line,"(t_newmethod)from_sc_new","(t_newmethod)from_sc_newnew")
- line=string.replace(line,"(t_newmethod)to_sc_new","(t_newmethod)to_sc_newnew")
- sys.stdout.write(line)
- if line=='#include "m_pd.h"\n':
- print 'static void *from_sc_newnew(t_symbol *s, int argc, t_atom *argv);'
- print 'static void *to_sc_newnew(t_symbol *s, int argc, t_atom *argv);'
- success=1
-
-if success==0:
- print "Fix gendasc.py script."
-
-
-
diff --git a/supercollider/k_sc~/help-k_sc~.pd b/supercollider/k_sc~/help-k_sc~.pd
deleted file mode 100644
index e25d9500..00000000
--- a/supercollider/k_sc~/help-k_sc~.pd
+++ /dev/null
@@ -1,8 +0,0 @@
-#N canvas 0 0 450 300 10;
-#X obj 197 62 from_sc~;
-#X obj 292 84 to_sc~;
-#X obj 285 43 osc~ 500;
-#X obj 200 131 dac~;
-#X connect 0 0 3 0;
-#X connect 0 1 3 1;
-#X connect 2 0 1 0;
diff --git a/supercollider/k_sc~/k_sc~.c b/supercollider/k_sc~/k_sc~.c
deleted file mode 100644
index 2b743ad9..00000000
--- a/supercollider/k_sc~/k_sc~.c
+++ /dev/null
@@ -1,147 +0,0 @@
-/* --------------------------- k_sc~ ----------------------------------- */
-/* ;; Kjetil S. Matheussen, 2004. */
-/* */
-/* This program is free software; you can redistribute it and/or */
-/* modify it under the terms of the GNU General Public License */
-/* as published by the Free Software Foundation; either version 2 */
-/* of the License, or (at your option) any later version. */
-/* */
-/* This program is distributed in the hope that it will be useful, */
-/* but WITHOUT ANY WARRANTY; without even the implied warranty of */
-/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
-/* GNU General Public License for more details. */
-/* */
-/* You should have received a copy of the GNU General Public License */
-/* along with this program; if not, write to the Free Software */
-/* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-/* */
-/* ---------------------------------------------------------------------------- */
-
-
-
-#include "fromto.c"
-
-#include <stdio.h>
-#include <stdbool.h>
-#include <jack/jack.h>
-
-
-static int num_ins=0;
-static int num_outs=0;
-
-static int getnumjackchannels(jack_client_t *client,char *regstring){
- int lokke=0;
- const char **ports=jack_get_ports(client,regstring,"",0);
- if(ports==NULL) return 0;
- while(ports[lokke]!=NULL){
- lokke++;
- }
- return lokke;
-}
-
-static void setupjack(void){
- static bool inited=false;
- int lokke;
- int num_sc_in,num_sc_out;
-
- jack_client_t *client;
-
- if(inited==true) return;
-
- if(sys_audioapi!=API_JACK){
- post("Error. k_sc~ will not work without jack as the sound API.");
- goto apiwasnotjack;
- }
-
- client=jack_client_new("k_sc_tilde");
-
- num_sc_in=getnumjackchannels(client,"SuperCollider:in_*");
- num_sc_out=getnumjackchannels(client,"SuperCollider:out_*");
-
- if(num_sc_in==0 || num_sc_out==0){
- post("Error. No Supercollider jack ports found.");
- goto nosupercolliderportsfound;
- }
-
- num_ins=sys_get_inchannels();
- num_outs=sys_get_outchannels();
-
- {
- int t1[1]={0};
- int t2[1]={0};
- int t3[1]={num_sc_out+num_ins};
- int t4[1]={num_sc_in+num_outs};
- sys_close_audio();
- sys_open_audio(1,t1,
- 1,t3,
- 1,t2,
- 1,t4,
- sys_getsr(),sys_schedadvance/1000,1);
- }
-
- for(lokke=0;lokke<num_sc_in;lokke++){
- char temp[500];
- char temp2[500];
- sprintf(temp,"pure_data_0:output%d",lokke+num_outs);
- sprintf(temp2,"SuperCollider:in_%d",lokke+1);
- jack_connect(client,temp,temp2);
- sprintf(temp,"alsa_pcm:capture_%d",lokke+1);
- jack_disconnect(client,temp,temp2);
- }
- for(lokke=0;lokke<num_sc_out;lokke++){
- char temp[500];
- char temp2[500];
- sprintf(temp,"pure_data_0:input%d",lokke+num_ins);
- sprintf(temp2,"SuperCollider:out_%d",lokke+1);
- jack_connect(client,temp2,temp);
- sprintf(temp,"alsa_pcm:playback_%d",lokke+1);
- jack_disconnect(client,temp2,temp);
- }
-
- inited=true;
-
- nosupercolliderportsfound:
- jack_client_close(client);
-
-
- apiwasnotjack:
- return;
-}
-
-static void *from_sc_newnew(t_symbol *s, int argc, t_atom *argv){
- int lokke;
- t_from_sc *x;
- setupjack();
- x=from_sc_new(s,argc,argv);
-
- for(lokke=0;lokke<x->x_n;lokke++){
- x->x_vec[lokke]+=num_outs;
- }
- return x;
-}
-
-static void *to_sc_newnew(t_symbol *s, int argc, t_atom *argv){
- int lokke;
- t_to_sc *x;
- setupjack();
- x=to_sc_new(s,argc,argv);
-
- for(lokke=0;lokke<x->x_n;lokke++){
- x->x_vec[lokke]+=num_ins;
- }
- return x;
-}
-
-
-static void k_sc_tilde_setup(void){
- d_to_sc_setup();
-}
-
-
-void from_sc_tilde_setup(void){
- k_sc_tilde_setup();
-}
-
-void to_sc_tilde_setup(void){
- k_sc_tilde_setup();
-}
diff --git a/supercollider/k_sc~/makefile b/supercollider/k_sc~/makefile
deleted file mode 100644
index 3d3eb639..00000000
--- a/supercollider/k_sc~/makefile
+++ /dev/null
@@ -1,90 +0,0 @@
-NAME=k_sc~
-CSYM=k_sc_tilde
-
-current: pd_linux
-
-# ----------------------- NT -----------------------
-
-pd_nt: $(NAME).dll
-
-.SUFFIXES: .dll
-
-PDNTCFLAGS = /W3 /WX /O2 /G6 /DNT /DPD /nologo
-VC="C:\Programme\Microsoft Visual Studio\VC98"
-
-PDNTINCLUDE = /I. /Ic:\pd\tcl\include /Ic:\pd\src /I$(VC)\include /Iinclude
-
-PDNTLDIR = $(VC)\Lib
-PDNTLIB = $(PDNTLDIR)\libc.lib \
- $(PDNTLDIR)\oldnames.lib \
- $(PDNTLDIR)\kernel32.lib \
- $(PDNTLDIR)\user32.lib \
- $(PDNTLDIR)\uuid.lib \
- c:\pd\bin\pd.lib \
-
-.c.dll:
- cl $(PDNTCFLAGS) $(PDNTINCLUDE) /c $*.c
- link /dll /export:$(CSYM)_setup $*.obj $(PDNTLIB)
-
-# ----------------------- IRIX 5.x -----------------------
-
-pd_irix5: $(NAME).pd_irix5
-
-.SUFFIXES: .pd_irix5
-
-SGICFLAGS5 = -o32 -DPD -DUNIX -DIRIX -O2
-
-SGIINCLUDE = -I../../src
-
-.c.pd_irix5:
- cc $(SGICFLAGS5) $(SGIINCLUDE) -o $*.o -c $*.c
- ld -elf -shared -rdata_shared -o $*.pd_irix5 $*.o
- rm $*.o
-
-# ----------------------- IRIX 6.x -----------------------
-
-pd_irix6: $(NAME).pd_irix6
-
-.SUFFIXES: .pd_irix6
-
-SGICFLAGS6 = -n32 -DPD -DUNIX -DIRIX -DN32 -woff 1080,1064,1185 \
- -OPT:roundoff=3 -OPT:IEEE_arithmetic=3 -OPT:cray_ivdep=true \
- -Ofast=ip32
-
-.c.pd_irix6:
- cc $(SGICFLAGS6) $(SGIINCLUDE) -o $*.o -c $*.c
- ld -n32 -IPA -shared -rdata_shared -o $*.pd_irix6 $*.o
- rm $*.o
-
-# ----------------------- LINUX i386 -----------------------
-
-pd_linux: fromto.c $(NAME).pd_linux
-
-.SUFFIXES: .pd_linux
-
-LINUXCFLAGS = -DPD -DUNIX -O2 -funroll-loops -fomit-frame-pointer \
- -Wall -W -Wshadow -Wstrict-prototypes \
- -Wno-unused -Wno-parentheses -Wno-switch
-
-PDSRCDIR=../../src
-LINUXINCLUDE = -I$(PDSRCDIR)
-
-.c.pd_linux: fromto,c
- gcc $(LINUXCFLAGS) $(LINUXINCLUDE) -g -o $*.o -c $*.c
- ld -export_dynamic -shared -o $*.pd_linux $*.o -lc -lm -ljack
- strip --strip-unneeded $*.pd_linux
- rm -f $*.o ../$*.pd_linux
- ln -s $*/$*.pd_linux ..
- ln -sf $*/$*.pd_linux ../from_sc~.pd_linux
- ln -sf $*/$*.pd_linux ../to_sc~.pd_linux
-
-# ----------------------------------------------------------
-
-fromto.c: gendasc.py
- ./gendasc.py $(PDSRCDIR) >fromto.c
-
-install:
- cp help-*.pd ../../doc/5.reference
-
-clean:
- rm -f *.o *.pd_* so_locations fromto.c *~