Hi

I mostly use Geany for my projects, so I decide to add syntax-highlighting for faust to it. I put all declared functions from faust/architecture/*.lib's in the primary section, and all faust internal functions in the secondary section. This gives a nice C/C++ style like syntax-highlight for dsp and lib files in geany. Additional it add Menu-entry’s to the geany/build menu, which allow to build and run faust-gtk or faust-qt apps direct from the geany menu.

Attached is a patch which will add filetypes.Faust.conf to .config/geany/filedefs/ and add the Faust type as Compiler language to .config/geany/filetype_extensions.conf.
You could apply it by put it in your /home and run from your /home directory

|patch -p0 < faustingeany.patch|



regards
hermann
diff -rupN .config/geany.orig/filedefs/filetypes.Faust.conf .config/geany/filedefs/filetypes.Faust.conf
--- .config/geany.orig/filedefs/filetypes.Faust.conf	1970-01-01 01:00:00.000000000 +0100
+++ .config/geany/filedefs/filetypes.Faust.conf	2014-12-09 19:24:04.707454174 +0100
@@ -0,0 +1,64 @@
+# For complete documentation of this file, please see Geany's main documentation
+
+[styling=C]
+
+[keywords]
+# all items must be in one line
+primary=RMS mean minn maxn sumn reducemap reduce lfnoise lfnoiseN lfnoise0 pink_noise oscr_demo oscrs_demo oscw oscq oscws oscwc oscs oscr oscrc oscrs oscrq oscb virtual_analog_oscillator_demo triangle triangleN imptrain imptrainN impulse diffn square squareN pulsetrain pulsetrainN sawtooth_demo saw2f4 saw2f2 sawtooth saw3 saw2 sawNp sawN saw1 lf_sawpos lf_rawsaw lf_squarewave lf_squarewavepos lf_pulsetrainpos lf_imptrain fl ml chebychevpoly chebychev bsmooth automat bpf TF2 spat gain8 gain7 gain6 gain5 gain4 gain3 gain2 bus8 bus7 bus6 bus5 bus4 bus3 bus2 panner adsr osci osc phase decimal sinwaveform samplingfreq tablesize noises multinoise multirandom noise RANDMAX random linear2db db2linear beat pulsen pulse period tempo sdelay echo43s echo21s echo10s echo5s echo2s echo1s time43s time21s time10s time5s time2s time1s millisec fdelay43s fdelay21s fdelay10s fdelay5s fdelay2s fdelay1s delay43s delay21s delay10s delay5s delay2s delay1s fdelay delay index frac line highShelf lowShelf peakNotch peakingEQ APF notch BPF HPF LPF biquad filtercoeff atodb cross dot hadamard butterfly interleave selector bus countup countdown interpolate subseq take count nextafter isnan fmin fmax fabs Yn Y1 Y0 Jn J1 J0 lgamma gamma erfc erf tanh cosh sinh atanh asinh acosh expm1 ilogb logb log1p scalb ldexp hypot cbrt inv neg PI BS SR rotate map wider optimInPhase optimMaxRe optimBasic decoderStereo decoder encoder mesh_square mesh_square zita_rev1 zita_rev1_ambi zita_rev1_stereo zita_rev_fdn_demo zita_distrib2 zita_in_delay zita_rev_fdn fdnrev0_demo stereo_reverb_tester prime_power_delays fdnrev0 satrev jcrev limiter_1176_R4_stereo limiter_1176_R4_mono compressor_demo gate_demo compression_gain_mono compressor_stereo compressor_mono gate_gain_mono gate_stereo gate_mono amp_follower_ud amp_follower stereo_width phaser2_demo phaser2_stereo phaser2_mono vibrato2_mono flanger_stereo flanger_mono piano_dispersion_filter crybaby_demo crybaby autowah wah4_demo wah4 moog_vcf_demo moog_vcf_2bn moog_vcf_2b moog_vcf exciter cubicnl_demo cubicnl_nodc cubicnl speakerbp levelfilterN levelfilter select2stereo bypass2 bypass1 cross2 log2 hz2pianokey pianokey2hz midikey2hz filterbanki filterbank analyzer filterbank_demo mth_octave_filterbank_demo octave_analyzer octave_filterbank half_octave_filterbank half_octave_analyzer third_octave_filterbank third_octave_analyzer spectral_level_demo mth_octave_spectral_level_demo spectral_level mth_octave_spectral_level_default mth_octave_spectral_level6e mth_octave_filterbank_default mth_octave_filterbank5 mth_octave_filterbank3 mth_octave_filterbank_alt mth_octave_filterbank mth_octave_analyzer_default mth_octave_analyzer5 mth_octave_analyzer3 mth_octave_analyzer mth_octave_analyzer6e fdelay4a fdelay3a fdelay1a fdelay5 fdelay4 fdelay3 fdelay2 fdelay1 parametric_eq_demo peak_eq_rm peak_eq_cq peak_eq highshelf_other_freq high_shelf1_l high_shelf1 high_shelf highshelf lowshelf_other_freq low_shelf1_l low_shelf1 low_shelf lowshelf bandpass12e bandpass6e bandpass0_bandstop1 bandstop bandpass highpass6e highpass3e lowpass6e lowpass3e highpass_minus_lowpass_odd highpass_plus_lowpass_odd highpass_minus_lowpass_even highpass_plus_lowpass_even highpass_minus_lowpass highpass_plus_lowpass lowpass0_highpass1 highpass lowpass resonbp resonhp resonlp tf1sb tf2sb tf1s tf2snp tf2s allpassn1m allpassnkl allpassnns allpassnn allpassn nlf2 wgr tf2np allpassnnlt iir_nl allpassn1mt iir_lat1 allpassnklt iir_kl allpassnt iir_lat2 bvav2nuv av2sv crossn1 crossnn block tf21t tf22t tf22 tf21 tf2 tf1 conv convN fir sub iir rev2 allpass_comb ffbcombfilter fbcombfilter fb_fcomb fb_comb ffcombfilter ff_fcomb ff_comb latch notchw dcblocker dcblockerat smooth tau2pole integrator pole zero environment mem prefix int float rdtable rwtable select2 select3 ffunction fconstant fvariable attach acos asin atan atan2 cos sin tan exp log log10 pow sqrt abs min max fmod remainder floor ceil rint
+
+secondary=process with case seq par sum prod import declare component library button checkbox vslider hslider nentry vgroup hgroup tgroup vbargraph hbargraph 
+# these are the Doxygen keywords
+docComment=
+
+[settings]
+lexer_filetype=C
+
+# default extension used when saving files
+extension=dsp
+
+# the following characters are these which a "word" can contains, see documentation
+#wordchars=_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789
+
+# single comments, like # in this file
+comment_single=//
+# multiline comments
+comment_open=/*
+comment_close=*/
+
+# set to false if a comment character/string should start at column 0 of a line, true uses any
+# indentation of the line, e.g. setting to true causes the following on pressing CTRL+d
+	#command_example();
+# setting to false would generate this
+#	command_example();
+# This setting works only for single line comments
+comment_use_indent=true
+
+# context action command (please see Geany's main documentation for details)
+context_action_cmd=
+
+[indentation]
+#width=4
+# 0 is spaces, 1 is tabs, 2 is tab & spaces
+#type=1
+
+[build_settings]
+# %f will be replaced by the complete filename
+# %e will be replaced by the filename without extension
+# (use only one of it at one time)
+compiler=faust -a jack-gtk.cpp "%f" -o "%e".cpp  
+linker=g++ "%e".cpp -Wfatal-errors -O3 -mfpmath=sse -msse -msse2 -ffast-math `pkg-config --cflags --libs jack gtk+-2.0` -o "%e"
+run_cmd="./%e"
+
+[build-menu]
+FT_00_LB=build gtk
+FT_00_CM=mkdir -p ./FAUST.geany && faust -a jack-gtk.cpp "%f" -o ./FAUST.geany/"%e".cpp && g++ ./FAUST.geany/"%e".cpp -Wfatal-errors -O3 -mfpmath=sse -msse -msse2 -ffast-math `pkg-config --cflags --libs jack gtk+-2.0` -o ./FAUST.geany/"%e" && rm -rf ./FAUST.geany/"%e".cpp
+FT_00_WD=
+FT_02_LB=run
+FT_02_CM=./FAUST.geany/"%e"
+FT_02_WD=
+FT_01_LB=build qt
+FT_01_CM=rm -rf ./FAUST.geany/qt/"%e" && mkdir -p ./FAUST.geany/qt/"%e" && faust -a jack-qt.cpp  "%f" -o ./FAUST.geany/qt/"%e"/"%f".cpp && cd ./FAUST.geany/qt/"%e" && /usr/bin/qmake-qt4 -project "QT += widgets printsupport" "DEFINES += " "INCLUDEPATH+=/usr/include/faust/" "INCLUDEPATH+=/usr/include/faust/osclib" "INCLUDEPATH+=/usr/include/faust/osclib" "INCLUDEPATH+=/usr/local/include/faust/" "LIBS+=-ljack  " "HEADERS+=/usr/include/faust/gui/faustqt.h" "HEADERS+=/usr/local/include/faust/gui/faustqt.h"  &&  /usr/bin/qmake-qt4  && make && cp "%e" ../../"%e" && cd ../../../ && rm -rf ./FAUST.geany/qt
+FT_01_WD=
+EX_00_LB=_Ausführen
+EX_00_CM=./FAUST.geany/%e
+EX_00_WD=
diff -rupN .config/geany.orig/filetype_extensions.conf .config/geany/filetype_extensions.conf
--- .config/geany.orig/filetype_extensions.conf	2014-12-09 19:43:47.868100591 +0100
+++ .config/geany/filetype_extensions.conf	2014-12-09 09:08:56.474900409 +0100
@@ -28,6 +28,7 @@ Ferite=*.fe;
 Forth=*.fs;*.fth;
 Fortran=*.f90;*.f95;*.f03;*.f08;*.F90;*.F95;*.F03;*.F08
 FreeBasic=*.bas;*.bi;
+Faust=*.dsp;*.lib;
 Genie=*.gs;
 GLSL=*.glsl;*.frag;*.vert;
 Go=*.go;
@@ -69,7 +70,7 @@ None=*;
 
 # Note: restarting is required after editing groups
 [Groups]
-Programming=Clojure;CUDA;Cython;Genie;Go;Rust;Scala;
+Programming=Clojure;CUDA;Cython;Genie;Go;Rust;Scala;Faust;
 Script=Graphviz;
 Markup=
 Misc=
------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk
_______________________________________________
Faudiostream-devel mailing list
Faudiostream-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/faudiostream-devel

Reply via email to