Skip to content

Instantly share code, notes, and snippets.

View ismaeldamiao's full-sized avatar

I. F. F. dos Santos ismaeldamiao

View GitHub Profile
@ismaeldamiao
ismaeldamiao / plot.gp
Last active July 30, 2024 14:10
Solution of problem 5.2 of Simon, The Oxford Solid State Basics
#!/usr/bin/env gnuplot
# MIT License
#
# Copyright (c) 2024 I.F.F. dos SANTOS
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the “Software”), to
# deal in the Software without restriction, including without limitation the
# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or

Android mic streamig

In this text I show how to use your android phone as microphone for your pc desktop using sox over ssh.

1 - Configure the desktop

You need have a pulseaudio server running in your pc desktop. Make a simple virtual microphone device using the following:

pactl load-module module-pipe-source source_name=virtmic file=/tmp/virtmic format=s32 rate=48000 channels=1
PROGRAM plotar
IMPLICIT none
REAL(8) :: x, y, theta = 0.0d0, dt = 0.01d0
INTEGER, PARAMETER :: arquivo = 10
OPEN(arquivo, FILE="pontos.dat")
DO; IF(theta > 2.0d0 * 3.1415d0) EXIT
#include<stdio.h>
#include<math.h>
int main(void){
double x, y, theta, dt = 0.01;
FILE *arquivo = fopen("pontos.dat", "w");
for(theta = 0.0; theta <= 2.0 * M_PI; theta += dt){
x = 2.0 * cos(2.0 * theta) * cos(theta);