Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API checklist #1

Open
jpcima opened this issue Nov 9, 2021 · 0 comments
Open

API checklist #1

jpcima opened this issue Nov 9, 2021 · 0 comments

Comments

@jpcima
Copy link
Owner

jpcima commented Nov 9, 2021

Simple math functions

  • sin(angle)
  • cos(angle)
  • tan(angle)
  • asin(x)
  • acos(x)
  • atan(x)
  • atan2(x,y)
  • sqr(x)
  • sqrt(x)
  • pow(x,y)
  • exp(x)
  • log(x)
  • log10(x)
  • abs(x)
  • min(x,y)
  • max(x,y)
  • sign(x)
  • rand(x)
  • floor(x)
  • ceil(x)
  • invsqrt(x)

Time functions

  • time([v])
  • time_precise([v])

Special variables

  • spl0, spl1 ... spl63
  • spl(channelindex)
  • slider1, slider2, ... slider64
  • slider(sliderindex)
  • slider_next_chg(sliderindex,nextval)
  • trigger
  • srate
  • num_ch
  • samplesblock
  • tempo
  • play_state
  • play_position
  • beat_position
  • ts_num
  • ts_denom
  • ext_noinit
  • ext_nodenorm
  • reg00-reg99
  • _global.*
  • pdc_delay
  • pdc_bot_ch, pdc_top_ch
  • pdc_midi

MIDI functions

  • midisend(offset,msg1,msg2)
  • midisend(offset,msg1,msg2 + (msg3 * 256))
  • midisend(offset,msg1,msg2,msg3)
  • midisend_buf(offset,buf, len)
  • midisend_str(offset,string)
  • midirecv(offset,msg1,msg23)
  • midirecv(offset,msg1,msg2,msg3)
  • midirecv_buf(offset,buf, maxlen)
  • midirecv_str(offset, string)
  • midisyx(offset,msgptr,len)
  • ext_midi_bus
  • midi_bus

File I/O and Serialization

  • file_open(index or slider)
  • file_close(handle)
  • file_rewind(handle)
  • file_var(handle,variable)
  • file_mem(handle,offset, length)
  • file_avail(handle)
  • file_riff(handle,nch,samplrate)
  • file_text(handle,istext)
  • file_string(handle,str)

Memory/Slider/FFT/MDCT Functions

  • mdct(start_index, size), imdct(start_index, size)
  • fft(start_index, size), ifft(start_index, size)
  • fft_real(start_index, size), ifft_real(start_index, size)
  • fft_permute(index,size), fft_ipermute(index,size)
  • convolve_c(dest,src,size)

Memory Utility

  • freembuf(top)
  • memcpy(dest,source,length)
  • memset(dest,value,length)
  • __memtop()

Stack

  • stack_push(value)
  • stack_pop(value)
  • stack_peek(index)
  • stack_exch(value)

Slider Functions

  • sliderchange(mask or sliderX)
  • slider_automate(mask or sliderX)
  • slider_show(mask or sliderX[, value])

Atomic Variable Access

  • atomic_setifequal(dest,value,newvalue)
  • atomic_exch(val1,val2)
  • atomic_add(dest_val1,val2)
  • atomic_set(dest_val1,val2)
  • atomic_get(val)

Pin Mapper Functions

  • get_host_numchan()
  • set_host_numchan(numchan)
  • get_pin_mapping(inout,pin,startchan,chanmask)
  • set_pin_mapping(inout,pin,startchan,chanmask,mapping)
  • get_pinmapper_flags(no parameters)
  • set_pinmapper_flags(flags)

String functions

  • strlen(str)
  • strcpy(str, srcstr)
  • strcat(str, srcstr)
  • strcmp(str, str2)
  • stricmp(str, str2)
  • strncmp(str, str2, maxlen)
  • strnicmp(str, str2, maxlen)
  • strncpy(str, srcstr, maxlen)
  • strncat(str, srcstr, maxlen)
  • strcpy_from(str,srcstr, offset)
  • strcpy_substr(str,srcstr, offset, maxlen)
  • str_getchar(str, offset[, type])
  • str_setchar(str, offset, value[, type])
  • strcpy_fromslider(str, slider)
  • sprintf(str,format, ...)
  • match(needle, haystack, ...)
  • matchi(needle, haystack, ...)

Graphics

  • gfx_set(r[g,b,a,mode,dest])
  • gfx_lineto(x,y,aa)
  • gfx_line(x,y,x2,y2[,aa])
  • gfx_rectto(x,y)
  • gfx_rect(x,y,w,h)
  • gfx_setpixel(r,g,b)
  • gfx_getpixel(r,g,b)
  • gfx_drawnumber(n,ndigits)
  • gfx_drawchar($'c')
  • gfx_drawstr(str[,flags,right,bottom])
  • gfx_measurestr(str,w,h)
  • gfx_setfont(idx[,fontface, sz, flags])
  • gfx_getfont()
  • gfx_printf(str, ...)
  • gfx_blurto(x,y)
  • gfx_blit(source, scale, rotation)
  • gfx_blit(source, scale, rotation[, srcx, srcy, srcw, srch, destx, desty, destw, desth, rotxoffs, rotyoffs])
  • gfx_blitext(source, coordinatelist, rotation)
  • gfx_getimgdim(image, w, h)
  • gfx_setimgdim(image, w,h)
  • gfx_loadimg(image, filename)
  • gfx_gradrect(x,y,w,h, r,g,b,a[, drdx, dgdx, dbdx, dadx, drdy, dgdy, dbdy, dady])
  • gfx_muladdrect(x,y,w,h, mul_r, mul_g, mul_b[, mul_a, add_r, add_g, add_b, add_a])
  • gfx_deltablit(srcimg,srcx,srcy,srcw,srch, destx, desty, destw, desth, dsdx, dtdx, dsdy, dtdy, dsdxdy, dtdxdy[, usecliprect=1] )
  • gfx_transformblit(srcimg, destx, desty, destw, desth, div_w, div_h, table)
  • gfx_circle(x,y,r[,fill,antialias])
  • gfx_roundrect(x,y,w,h,radius[,antialias])
  • gfx_arc(x,y,r, ang1, ang2[,antialias])
  • gfx_triangle(x1,y1,x2,y2,x3,y3[,x4,y4,...])
  • gfx_getchar([char])
  • gfx_showmenu("str")
  • gfx_setcursor(resource_id[,"custom cursor name"])
  • gfx_getdropfile(idx[,#str]) (not documented in JSFX)
  • gfx_r, gfx_g, gfx_b, gfx_a
  • gfx_w, gfx_h
  • gfx_x, gfx_y
  • gfx_mode
  • gfx_clear
  • gfx_dest
  • gfx_texth
  • gfx_ext_retina (lib OK, plugin needs work)
  • mouse_x
  • mouse_y
  • mouse_cap
  • mouse_wheel
  • mouse_hwheel
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant